2

I recently updated to Drupal 8.6.2 and Paragraphs 8.x-1.3.

I have a content type with a Paragraphs field. When I try to update an existing node I get the following error message:

The referenced entity (user: 21) does not exist.

  • The existing paragraphs do not reference users directly.
  • User 21 does not exist.
  • User 21 is not the node author.
  • I can only update the node if delete all of the paragraphs, of every type.
  • There are no pending db updates or entity updates.

My feeling is that something didn't update correctly, but I'm not sure how to check / rerun the updates. (There were a number of updates to be run when I deployed the 8.6.2 update.)

UPDATE: I rolled back to the previous release and DB state, and I still get the error (which no one noticed), so it is not related to the update.

UPDATE 2: Ticket on drupal.org

  • You may need to make sure you have the latest version of the entity reference revisions module. I think there was problem with translations and ownership that has been resolved. This might be related. – CG Monroe Oct 22 '18 at 18:46
  • @CGMonroe I updated entity reference revisions when I updated paragraphs. My feeling is that the update didn't go smoothly, but I'm not sure where. – Tim Oct 23 '18 at 5:37
  • 1
    I know its tedious, but have you dug through the paragraph tables in the DB and looked for a reference to User 21? It may help shed a bit of light on whats happening. – bleen Oct 23 '18 at 13:18
  • 1
    Yes, I would do the same. Probably you need to check only the paragraphs of this node, because the error is clearly a validation error of a subform in this node form. – 4k4 Oct 23 '18 at 13:33
1

User 21 was deleted, but 21 was still stored as the value in the uid column of the paragraphs tables. Changing the uid to that of an existing user (23) solved the problem:

UPDATE paragraphs_item_field_data SET uid = 23 WHERE uid = 21;
UPDATE paragraphs_item_revision SET revision_uid = 23 WHERE revision_uid = 21;
UPDATE paragraphs_item_revision_field_data SET uid = 23 WHERE uid = 21;

Run SQL, empty cache, reload edit page.

Note: other tables also contain the uid 21, but without a (noticeable) adverse effect.

UPDATE file_managed SET uid = 23 where uid = 21;
UPDATE node_field_data SET uid = 23 where uid = 21;
UPDATE node_field_revision SET uid = 23 where uid = 21;
UPDATE node_revision SET revision_uid = 23 where revision_uid = 21;

And two from contrib:

UPDATE crop_revision SET revision_uid = 23 where revision_uid = 21;
UPDATE redirect SET uid = 23 where uid = 21;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.