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

Revision ID in {node} and {node_revision} can get out of sync

$
0
0

Problem/Motivation

It's possible for the revision ID in {node} and the one in {node_revision to be out of sync.

All reports on this issue point to this happening due to migrations, although since migrate uses the entity API, it's posted against that.

Proposed resolution

Throw an exception if either of the following happens:

1. The entity is saved with a different ID to the one it was loaded with

2. The entity is saved with a different revision ID to the one it was loaded with, if it's not saving a new revision.

This only stops the bad data from being saved, it doesn't fix any migration issues that might lead to attempting to save that bad data, but it should help to flush them out - we already have issues open for incremental migrations and ID preservation which are possible culprits.

Remaining tasks

Better/shorter steps to reproduce.

User interface changes

API changes

Data model changes

Original report:

Hello Views crew. I just did an upgrade from D6 to D8 using drupal update module.

After doing the update I used the UI to delete all the content types the client doesn't require anymore.

When I go to /admin/content

I get the following PHP error:

[24-Dec-2015 13:25:36 America/Denver] Recoverable fatal error: Argument 1 passed to Drupal\views\Plugin\views\field\EntityOperations::getEntityTranslation() must implement interface Drupal\Core\Entity\EntityInterface, null given, called in [path.to.my.site]/core/modules/views/src/Plugin/views/field/EntityOperations.php on line 116 and defined in [path.to.my.site]/core/modules/views/src/Entity/Render/EntityTranslationRenderTrait.php on line 74

So it looks like Drupal8 is using a View to list the content on this page. All the content should just be in English there is no translation going on on the old D6 site. I looked at the source code on the lines given but I am still getting up to speed on D8 architecture - anyone have any insight into the issue? Why would this sort of error happen on the basic admin/content page?

Thank you.

Seb
http://fountain-city.com


Viewing all articles
Browse latest Browse all 299355

Latest Images

Trending Articles



Latest Images

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