When a user is granted view/edit access to an unpublished node, it prevents the node from publishing correctly.

The "Published" box shows as checked, and the record in the node table shows status = 1 (indicating it is published), but the node is not visible to users with permission to view published content (anonymous and authenticated users, in our case).

It looks like records for the anonymous and authenticated roles are not being added in the nodeaccess table. I typically see 3 entries in the nodeaccess table for a published node (see screenshot). When I publish a node where user was granted view/edit access while the node was in an unpublished state, though, I only see 1 entry in the nodeaccess table - the one for the user. The entries for roles are omitted.

Steps to reproduce:

  • Ensure anonymous and authenticated users have “view published content” permission
  • Create new node - leave unpublished
  • Grant view/edit access to a user via the Grant tab
  • Publish page

Result:
The node cannot be viewed by anonymous users or authenticated users. An "Unauthorized Access" error is shown. No entries exist in the nodeaccess table granting 'view' access to the anonymous and authenticated roles.

NOTE: I do not have anything checked for "Allowed Roles" on the Nodeaccess config page, because we are only using this module to grant access to individual users, not all users of a certain role.

Comments

gc_drupal_dev created an issue. See original summary.

d.fisher’s picture

Status: Active » Postponed (maintainer needs more info)

Drupal 7 security support has ended as of 5 January 2025.

We are doing some housekeeping on the nodeaccess issue queue and moving all Drupal 7 issues to "postponed (maintainer needs more info)". See https://www.drupal.org/project/nodeaccess/issues/3516593.

If this issue persists on the latest dev branch of nodeaccess (2.0.x-dev) then please feel free to comment and we will change the version against this issue. If we do not hear any feedback within 2 weeks (9th October 2025) we will go ahead and close this issue as outdated.

Thank you.

d.fisher’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

As per the above, as there has been no response we will now close this issue as outdated.

If this issue persists on the latest dev branch of nodeaccess (2.0.x-dev) then please feel free to update the version on this issue and reopen it.

Thank you.

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.