Problem/Motivation
I've upgraded from 1.x to 2.0.1@alpha in preparation for upgrading from Drupal core 10 > 11.
After upgrading the nodeacess module via Composer and exporting the updated configuration from Drupal, I noticed all settings had been emptied:
- bundles_roles_grants
- grants_tab_availability
- map_rid_gid
- roles_settings
There seemed to be no changes to the config's YAML data structure from 1.x > 2.x, so I discarded the changes and re-imported the config to match my site prior to the 2.x update. It imported without any errors/warnings.
Steps to reproduce
- Ensure you have at least one node with grants assigned
- Update
drupal/nodeaccessin composer from^1.0 > ^2.0@alpha - View the page with grants assigned
- Select the Grants tab
- The grants should all be empty
However, when inspecting the database table, the grants data is still present.
Selecting grants in the browser UI and saving the page updates the database, and the change is then visible in the UI when refreshing the page. Further changes to the grants in the UI are also preserved correctly.
It seems like there is a disconnect between the form rendering the data.
Proposed resolution
Ensure the grant forms correctly reflect the database records.
Comments
Comment #2
timfletcher commentedComment #3
d.fisher commentednodeaccess.settings.yml 1.x
nodeaccess.settings.yml 2.x
There is an update hook provided in nodeaccess.install:
https://git.drupalcode.org/project/nodeaccess/-/blob/2.0.x/nodeaccess.in...
Did you run
drush updb/drush updatedbanddrush cr/drush cache:rebuild?Please let me know and I can investigate this further if you're still having issues?
Comment #4
d.fisher commentedIs this the same issue as:
https://www.drupal.org/project/nodeaccess/issues/3509391
If so we should also mark one of these as closed (duplicate).
Comment #5
quotientix commentedThe settings are successfully migrated with
updb.But the individual grants per user are deleted during update (the ones I set on
/node/123/grants).Comment #6
thallesThe same thing happened to me.
Comment #7
d.fisher commented