[error] Update aborted by: varbase_media_update_100005

Created on 4 January 2025, 2 months ago

Hi i'm update form 10.1 to 10.4 and get these issues while upgrading the database?

by drush updb -y

> [notice] Update started: varbase_media_update_100005
> [error] Entity user.role.editor does not exist
> [error] Update failed: varbase_media_update_100005
[error] Update aborted by: varbase_media_update_100005
[error] Finished performing updates.

if i create an editor role in the UI, the error is replaced by:

[error] Adding non-existent permissions to a role is not allowed. The incorrect permissions are "access entity usage statistics".

by /update.php

varbase_media module
100005 - Issue #3470979: Grant Access to Entity Usage Statistics. For Site Admins and Editorial Team.

i used
"drupal/varbase_media": "^10.0",

I alreay tried the suggested patchs on https://www.drupal.org/project/drupal/issues/3358586#comment-15924231 💬 RuntimeException: Adding non-existent permissions to a role is not allowed Active
that was not helping me

each patch give me another error on the roles
Entity user.role.seo_admin does not exist

💬 Support request
Status

Active

Version

10.4

Component

other

Created by

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

Comments & Activities

  • 🇬🇧United Kingdom longwave UK

    Moving this to the Varbase Media project, we can't help you with this in core.

  • 🇬🇧United Kingdom andy tawse

    Hi,

    The problem here seems to be that the recipe update varbase_media_update_100005 assumes that the config originally created by the recipe already exists i.e. that those user roles exist. The project I'm working on has varbase media installed, but does not have those roles, so the update can't run and this stops the update process.

    I can't find anything in the recipe docs to deal with this situation in a recipe.yml. I think it's a legitimate use case that a recipe may have been applied, but configuration was later changed outside of the module.

    Would a better approach be to handle this in an update hook so you can check whether the roles do exist?

    I'm going to try that out and post back.

    thanks

Production build 0.71.5 2024