Update entity_access_by_reference_field_update_9002 fails

Created on 10 May 2023, over 1 year ago
Updated 11 May 2023, over 1 year ago

Problem/Motivation

Do you wish to run the specified pending updates? (yes/no) [yes]:
 > y

>  [notice] Update started: entity_access_by_reference_field_update_9002
>  [error]  Adding non-existent permissions to a role is not allowed. The incorrect permissions are "entity_by_access_role_field.ignore_permission", "ignore_referenced_field_permission".
>  [error]  Update failed: entity_access_by_reference_field_update_9002
>  [notice] Update started: entity_access_by_role_field_update_9001
>  [error]  Adding non-existent permissions to a role is not allowed. The incorrect permissions are "entity_by_access_role_field.ignore_permission", "ignore_referenced_field_permission".
>  [error]  Update failed: entity_access_by_role_field_update_9001
 [error]  Update aborted by: entity_access_by_reference_field_update_9002, entity_access_by_role_field_update_9001
 [error]  Finished performing updates.

entity_by_access_role_field is not the module name. Sadly we didn't see that.

@Grevil please fix this ASAP and create a new release. Thanks :)

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇩🇪Germany Anybody Porta Westfalica

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Anybody
  • 🇩🇪Germany Anybody Porta Westfalica

    Interesting! Seems like not adding the permission is the problem, but the old permissions have to be removed first, as they are no more existing, when adding the new one?

  • First commit to issue fork.
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 8.2 & MySQL 8
    last update over 1 year ago
    18 pass
  • @grevil opened merge request.
  • Status changed to Needs review over 1 year ago
  • 🇩🇪Germany Grevil

    Fixed! I did the following to make sure this would work:

      • Install the module with an edited permission and install file to have the old permission name and the hook commented out
      • Give the old permission to both authenticated AND Conent Editor roles and save
      • Rename the permission to the new permission name and comment in the reworked update hook
      • Run "drush updb" and update
      • No errors on update, the roles given the old permission, have the new permission and the old permission is not mentioned in the permission overview
    1. Status changed to RTBC over 1 year ago
    2. 🇩🇪Germany Anybody Porta Westfalica

      RTBC! Please merge and tag a new release @Grevil!

      • Grevil committed 785c3dd3 on 1.x
        Issue #3359499: Update entity_access_by_reference_field_update_9002...
    3. Status changed to Fixed over 1 year ago
    4. Automatically closed - issue fixed for 2 weeks with no activity.

    Production build 0.71.5 2024