Bug #23409 Bug Fixed

PHP Notice when using relationship + file tag pair

Version: 4.0.5 Reporter: James Catt

This isn’t a huge issue as the tag output is still working as expected, and it only seems to happen with a specific channel/field (so I can’t rule out that it’s something wonky with my site), but I’d like to get to the bottom of it if possible.

Here’s my template:

{exp:channel:entries channel="my_channel"}
        
  {my_relationship_field}
                            
    {my_relationship_field:my_file_field}

      {!-- some code here, but the error still displays even if this is empty --}

    {/my_relationship_field:my_file_field}

  {/my_relationship_field}
        
{/exp:channel:entries}

As I mentioned, the output from the template is correct, but I’m getting the following PHP Error:

Notice
Undefined index: field_id_21
ee/legacy/libraries/channel_entries_parser/components/Custom_field_pair.php, line 138

Severity: E_NOTICE

field_id_21 == my_file_field (I get the same error repeated for every file field referenced)

The strange thing is that I have the same pattern in another template (with a different parent channel + relationship field, but the same child channel + file field), but I’m not getting the same error message.

I’ve looked at the debugging output but I’m not seeing any obvious issues.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases