Drupal\entity_reference\Tests\EntityReferenceAdminTest->testFieldAdminHandler() causes two exceptions and a test fail that are reproduceable on PHP 5.4.4, 5.4.14, and 5.4.16. The problems don't occur on PHP 5.3.10 and 5.3.14. The exceptions are:
- call_user_func_array() expects parameter 1 to be a valid callback, class 'Content' not found
- call_user_func_array() expects parameter 1 to be a valid callback, class 'type' not found

This duplicate issue has some detective work in the OP: #2043099: Entity Reference UI test fails on PHP 5.4.4 (-> HEAD broken)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

amateescu’s picture

amateescu’s picture

Status: Active » Needs review
FileSize
4.61 KB

I spent some quality (not!) hours with this one, digging through a reference and serialization hell, and this patch seems to fix it.

alexpott’s picture

Status: Needs review » Needs work
amateescu’s picture

Status: Needs work » Postponed

It's definitely related, if not duplicate. Let's wait a bit with this one for now..

yched’s picture

From @Berdir on #2071969: Serialize interface not reliable:

This [patch in #2071969: Serialize interface not reliable] fixes the warnings in the currently failing EntityReferenceAdminTest on 5.4 but apparently not the final test fail, which doesn't seem to be related to this but some xpath stuff?

amateescu’s picture

Status: Postponed » Closed (duplicate)

The notices/fails seems to be fixed on https://qa.drupal.org/pifr/test/600303 (5.4.17) and for me locally on 5.4.4...

amateescu’s picture

Title: Drupal\entity_reference\Tests\EntityReferenceAdminTest fails on PHP 5.4 » Drupal\entity_reference\Tests\EntityReferenceAdminTest fails on PHP 5.4.9 and libxml 2.9.0
Status: Closed (duplicate) » Needs review
FileSize
892 bytes

Actually, @Berdir says that having the xpath a bit more specific works for him locally, so let's just do this small change.

Berdir’s picture

Title: Drupal\entity_reference\Tests\EntityReferenceAdminTest fails on PHP 5.4.9 and libxml 2.9.0 » Drupal\entity_reference\Tests\EntityReferenceAdminTest fails on PHP 5.4
FileSize
892 bytes

Yes, with the exception of a weird fail on the last assertion that only seems to happen for me with 5.4.9/libxml 2.9.0 and seems to work fine for @amateescu with 5.4.4/libxml 2.7.7.

Somehow that only returns the first match for me, whereas I assume it returns a list of all field labels for others.

It seems the xpath query can be made more specific to only target the field we care about, then it works with both versions.

amateescu’s picture

Title: Drupal\entity_reference\Tests\EntityReferenceAdminTest fails on PHP 5.4 » Drupal\entity_reference\Tests\EntityReferenceAdminTest fails on PHP 5.4.9 and libxml 2.9.0

Bringing back the more explicit title.

amateescu’s picture

Status: Needs review » Reviewed & tested by the community

So we both posted patches thinking that other one could RTBC it :D Since it's his patch originally, I guess I'll have to push the button.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Added info about a duplicate issue.