Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295377

Call to nonexistent "entityType()" method from content_translation_entity_presave()

$
0
0

I'm not sure how hard this will be to reproduce, it's happening on a D8 site that has been upgraded all the way from the first D8 RCs, but this method call is clearly wrong, as a quick find operation in all of Drupal's codebase can't find any instance of " entityType(". The offending code is:

$entity->original = \Drupal::entityTypeManager()
  ->getStorage($entity->entityType())->loadUnchanged($entity->id());

When saving a node, in certain conditions (in my case it happens only when I add two values to an entity reference field, which could mean that this is related to that AJAX operation where you add an extra field), the following fatal error occurs:

PHP Fatal error:  Call to undefined method Drupal\node\Entity\Node::entityType() in /path/to/drupal/core/modules/content_translation/content_translation.module on line 416

Viewing all articles
Browse latest Browse all 295377

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>