1

I'm opening this issue here on StackExchange because the folks at Ellis seem to be incapable of resolving this issue https://support.ellislab.com/bugs/detail/20748/relationship-parents-php-parse-error-ignores-condition

If there are any PHP gurus out there who can troubleshoot this issue, please weigh in. PHP is not my forte.

This is what I've found:

{parents field="doctors_locations" limit="1"}
    {if parents:doctors_locations:total_results >= 1}
        <a href="/search/doctors?category:affiliation=78|79|80|218&amp;child:doctors_locations={entry_id}&amp;orderby_sort=doctors_last_name|asc" class="button button-green mb30">View Doctors</a>
    {if:else}
        {!-- RETURN NOTHING --}
    {/if}
{/parents}

This returns more than 100 PHP errors in a search results page with 10 results. This is the most common error:

A PHP Error was encountered
Severity: Notice

Message: Undefined index: 66

Filename: relationship_parser/Tree_builder.php

Line Number: 544

Towards the end of the errors, I found this:

A PHP Error was encountered
Severity: Notice

Message: Undefined offset: 4529

Filename: relationship_parser/Parser.php

Line Number: 52

And finally this:

A PHP Error was encountered
Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /MYPATH/system/codeigniter/system/core/Exceptions.php:170)

Filename: core/Common.php

Line Number: 479

If I remove the conditionals like this:

{parents field="doctors_locations" limit="1"}
    <a href="/search/doctors?category:affiliation=78|79|80|218&amp;child:doctors_locations={entry_id}&amp;orderby_sort=doctors_last_name|asc" class="button button-green mb30">View Doctors</a>
{/parents}

I only get 3 PHP errors that are basically the same:

A PHP Error was encountered
Severity: Notice

Message: Undefined offset: 4530

Filename: relationship_parser/Parser.php

Line Number: 52

The only difference between the three errors is that the Undefined offset increments from 4528 to 4530.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.