We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Parents tag - channel/field required?

Developer Preview

Boyink!'s avatar
Boyink!
5,011 posts
13 years ago
Boyink!'s avatar Boyink!

Let me know if I’m being too specific based on where the development is at..😉

The docs make it sound like the channel/field parameters on the parent tag are optional:

You can get more specific by specifying a channel and a field that you want to check to see if this entry is a child.

But using the parents tag in a template without them netted this error:

Fatal error: Uncaught exception ‘RuntimeException’ with message ‘Parent tag without field parameter.’ in /Applications/MAMP/htdocs/gb_backup/system/expressionengine/libraries/Relationships.php:573 Stack trace: #0 /Applications/MAMP/htdocs/gb_backup/system/expressionengine/libraries/Relationships.php(391): Relationship_Parser->_unique_entry_ids(Object(QueryNode), Array) #1 /Applications/MAMP/htdocs/gb_backup/system/expressionengine/modules/channel/mod.channel.php(363): Relationship_Parser->query_for_entries(Array) #2 /Applications/MAMP/htdocs/gb_backup/system/expressionengine/libraries/Template.php(1295): Channel->entries() #3 /Applications/MAMP/htdocs/gb_backup/system/expressionengine/libraries/Template.php(884): EE_Template->process_tags() #4 /Applications/MAMP/htdocs/gb_backup/system/expressionengine/libraries/Template.php(453): EE_Template->tags() #5 /Applications/MAMP/htdocs/gb_backup/system/expressionengine/libraries/Template.php(235): EE_Template->parse(‘??{embed=”embed…’, false, ”) #6 /Applications/MAMP/htdocs/g in /Applications/MAMP/htdocs/gb_backup/system/expressionengine/libraries/Relationships.php on line 573
       
Pascal Kriete's avatar
Pascal Kriete
2,589 posts
13 years ago
Pascal Kriete's avatar Pascal Kriete

Unless something deal breaking comes up, they will be optional in the end. And no ugly exceptions either 😊 .

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.