Updating from 1.x to 2.0.1@alpha purges settings and grant field data

Created on 5 March 2025, 5 days ago

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 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

  1. Ensure you have at least one node with grants assigned
  2. Update drupal/nodeaccess in composer from ^1.0 > ^2.0@alpha
  3. View the page with grants assigned
  4. Select the Grants tab
  5. 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.

🐛 Bug report
Status

Active

Version

2.0

Component

User interface

Created by

🇦🇺Australia timfletcher

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

Comments & Activities

Production build 0.71.5 2024