Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
https://qa.drupal.org/pifr/test/734888
https://qa.drupal.org/8.x-status
Drupal\system\Tests\Ajax\MultiFormTest
is a nice + fast test case.
drupalPostAjaxForm()
shows the following fatal error in the page output of the internal browser:
Fatal error: Call to a member function getPropertyDefinitions() on a non-object
in \core\lib\Drupal\Core\Field\TypedData\FieldItemDataDefinition.php on line 71
-
{main}( ) ..\index.php:0
drupal_handle_request( ) ..\index.php:15
Drupal\Core\DrupalKernel->handle( ) ..\bootstrap.inc:1641
Drupal\Core\HttpKernel->handle( ) ..\DrupalKernel.php:283
Symfony\Component\HttpKernel\HttpKernel->handle( ) ..\HttpKernel.php:65
Symfony\Component\HttpKernel\HttpKernel->handleRaw( ) ..\HttpKernel.php:66
call_user_func_array ( ) ..\HttpKernel.php:126
Drupal\Core\Controller\AjaxController->content( ) ..\HttpKernel.php:126
Drupal\Core\Controller\AjaxController->getContentResult( ) ..\AjaxController.php:58
call_user_func_array ( ) ..\AjaxController.php:82
Drupal\system\Controller\FormAjaxController->content( ) ..\AjaxController.php:82
Drupal\system\Controller\FormAjaxController->getForm( ) ..\FormAjaxController.php:36
form_get_cache( ) ..\FormAjaxController.php:77
Drupal\Core\Form\FormBuilder->getCache( ) ..\form.inc:163
Drupal\Core\KeyValueStore\StorageBase->get( ) ..\FormBuilder.php:367
Drupal\Core\KeyValueStore\DatabaseStorageExpirable->getMultiple( ) ..\StorageBase.php:40
array_map ( ) ..\DatabaseStorageExpirable.php:70
Drupal\entity\Entity\EntityFormDisplay->unserialize( ) ..\DatabaseStorageExpirable.php:0
Drupal\entity\Entity\EntityFormDisplay->__construct( ) ..\EntityFormDisplay.php:164
Drupal\entity\EntityDisplayBase->__construct( ) ..\EntityFormDisplay.php:118
Drupal\entity\EntityDisplayBase->init( ) ..\EntityDisplayBase.php:138
Drupal\entity\EntityDisplayBase->getFieldDefinitions( ) ..\EntityDisplayBase.php:223
_field_create_entity_from_ids( ) ..\EntityDisplayBase.php:337
entity_create( ) ..\field.module:677
Drupal\Core\Entity\FieldableEntityStorageControllerBase->create( ) ..\entity.inc:365
Drupal\Core\Entity\ContentEntityBase->__construct( ) ..\FieldableEntityStorageControllerBase.php:70
Drupal\Core\Entity\ContentEntityBase->setDefaultLangcode( ) ..\ContentEntityBase.php:152
Drupal\Core\Entity\ContentEntityBase->get( ) ..\ContentEntityBase.php:565
Drupal\Core\Entity\ContentEntityBase->getTranslatedField( ) ..\ContentEntityBase.php:385
Drupal\Core\TypedData\TypedDataManager->getPropertyInstance( ) ..\ContentEntityBase.php:422
Drupal\Core\TypedData\TypedDataManager->create( ) ..\TypedDataManager.php:276
Drupal\Core\TypedData\TypedDataManager->createInstance( ) ..\TypedDataManager.php:128
Drupal\Core\Field\FieldItemList->__construct( ) ..\TypedDataManager.php:89
Drupal\Core\TypedData\Plugin\DataType\ItemList->createItem( ) ..\FieldItemList.php:50
Drupal\Core\TypedData\TypedDataManager->getPropertyInstance( ) ..\ItemList.php:172
Drupal\Core\TypedData\TypedDataManager->create( ) ..\TypedDataManager.php:276
Drupal\Core\TypedData\TypedDataManager->createInstance( ) ..\TypedDataManager.php:128
Drupal\Core\Field\FieldItemBase->__construct( ) ..\TypedDataManager.php:89
Drupal\Core\Field\TypedData\FieldItemDataDefinition->getPropertyDefinitions( ) ..\FieldItemBase.php:40
Comment | File | Size | Author |
---|---|---|---|
#6 | drupal8.entity-php54-hiccups.do-not-test.patch | 1.56 KB | sun |
#3 | stupid-php-2205367-3.patch | 1.52 KB | Berdir |
Comments
Comment #1
sunDrupal\system\Tests\Ajax\MultiFormTest
is a nice + fast test case.Comment #2
BerdirPretty sure it's caused by #2002134: Move TypedData metadata introspection from data objects to definition objects, looking into it.
Comment #3
BerdirGrr.
\Serializable in PHP 5.4 is seriously messed up.
I have no idea what is exactly going on, but this seems to be working for me?!
Comment #4
fagoI don't think that code stems from #2002134: Move TypedData metadata introspection from data objects to definition objects, but it might have triggered the problem. #3 looks good to me
Comment #5
swentel CreditAttribution: swentel commentedWe'v had this in Field API config conversion too - see #2074253: Fatal error when using Serializable interface on PHP 5.4
Comment #6
sunI noticed this mismatch in the inheritance chain, but changing it did not resolve it.
I also noticed a seemingly unintended self:: instead of static:: call to create() in DataDefinition, but changing that did not help either.
The patch in #3, however, passes for me locally.
Comment #7
alexpottOkay patch in #3 is committed d1bbfa7 and pushed to 8.x. Thanks!
Comment #9
sunhttps://qa.drupal.org/8.x-status :-)
Comment #10
yched CreditAttribution: yched commentedFor consistency, the __sleep() / __wakeup() should be added to EntityViewDisplay too.
Then this very same code is duplicated in 4 different config entity classes.
--> Revived #1977206: Default serialization of ConfigEntities.
Content entities have default serialization code in ContentEntityBase now, config entities should have theirs too.
Comment #11
swentel CreditAttribution: swentel commentedSo this broke #2210873: Let plugin bags use the DependencySerializationTrait (was: EditorAdminTest fails on PHP 5.4 silently with unicorn editor) - but very silently, possibly depending on 5.4.X version as it's not catched by the bot.