Trigger watchdog when node rebuild permissions fails

Created on 23 May 2009, about 16 years ago
Updated 19 February 2023, over 2 years ago

On trying to use any kind of node permissions module (the main case: forum_access), when I went to rebuild node permissions from the accepted ~/admin/content/node-settings/rebuild the status bar would complete to 100% and I would get the following error message:

The content access permissions could not be rebuilt.
The content access permissions need to be rebuilt.

That was on two of three sites in a multisite installation. The third would get to 97% and stall.

The only solution, after much consultation with Marco at Advomatic, was to put this in a node and click "Preview":

<?php
set_time_limit(0);
db_query("DELETE FROM {node_access}");
node_access_rebuild();
?>

That makes the error go away. Marco suspects an issue with the batch function.

πŸ› Bug report
Status

Needs work

Version

9.5

Component
Node systemΒ  β†’

Last updated about 6 hours ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States LynnS

Live updates comments and jobs are added and updated live.
  • Needs backport to D6

    After being applied to the 7.x branch, it should be considered for backport to the 6.x branch. Note: This tag should generally remain even after the backport has been written, approved, and committed.

  • Needs backport to D7

    After being applied to the 8.x branch, it should be considered for backport to the 7.x branch. Note: This tag should generally remain even after the backport has been written, approved, and committed.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

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.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request β†’ as a guide.

    Did not review or test

    Moving to NW for the issue summary update requested in #34

  • πŸ‡¬πŸ‡§United Kingdom catch

    This is a task now that πŸ› Node Access Rebuild never finishes (infinite loop) Fixed is dealing with the actual bug.

  • πŸ‡³πŸ‡ΏNew Zealand quietone
  • Status changed to Postponed: needs info 6 days ago
  • πŸ‡¦πŸ‡ΊAustralia acbramley

    This issue was originally created because when the node wasn't loaded, the batch failed and the user was presented with "could not be rebuilt" and "need to be rebuilt" messages simultaneously.

    Now that πŸ› Node Access Rebuild never finishes (infinite loop) Fixed fixed the bug when a node couldn't be loaded, I'm not really sure what relevant information we could provide in this log message and why it would be the job of this batch process to call out a faulty node? A node has to exist in the database and then produce an error on load to even hit this issue (since $nids come from an entity query).

    What information could we actually provide here that would help a user in any way? They'd still see a successful batch operation afaict.

Production build 0.71.5 2024