"Unauthorized Access" shown on published node when a user is granted access prior to publishing

Created on 22 January 2016, over 9 years ago
Updated 25 September 2025, 11 days ago

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.

🐛 Bug report
Status

Postponed: needs info

Version

1.4

Component

Code

Created by

🇺🇸United States gc_drupal_dev

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024