If you update frontend_editing as part of a Drupal 10 update frontend_editing_11004 runs before user_update_10000 which can lead to failing deployments.

In the past non-existing permission were allowed in roles, but in D10 they are not allowed anymore and when frontend_editing_update_11004 trys to add permissions before the old ones were cleaned up from user_update_10000 it can trigger an error like the following:

  >  [notice] Update started: frontend_editing_update_11004
  >  [error]  Adding non-existent permissions to a role is not allowed. The i
  ncorrect permissions are "clone faq content", "enter faq revision log entry
  ", "override faq authored by option", "override faq authored on option", "o
  verride faq published option", "view any unpublished faq content".
  >  [error]  Update failed: frontend_editing_update_11004

This can be prevented if frontend_editing_update_11004 runs after user_update_10000.

I'll provide a patch.

CommentFileSizeAuthor
#2 3408355_2.patch1.82 KBnorman.lol

Comments

leymannx created an issue. See original summary.

norman.lol’s picture

Assigned: norman.lol » Unassigned
Status: Active » Needs review
StatusFileSize
new1.82 KB

I think we need to keep an empty frontend_editing_update_11004 in place for all those projects where this hook was already run, but basically it's just a reminder for every developer that the next update hook needs to be frontend_editing_update_11005.

a.dmitriiev’s picture

Status: Needs review » Fixed

Agree, the changes from the patch were applied and will be added to the new release.

Status: Fixed » Closed (fixed)

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