Active
Project:
Drupal core
Version:
main
Component:
node system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
21 Apr 2015 at 14:46 UTC
Updated:
25 Mar 2025 at 00:01 UTC
Jump to comment: Most recent
// Remind site administrators about the {node_access} table being flagged
// for rebuild. We don't need to issue the message on the confirm form, or
// while the rebuild is being processed.
if ($route_name != 'node.configure_rebuild_confirm' && $route_name != 'system.batch_page.normal' && $route_name != 'help.page.node' && $route_name != 'help.main'
&& \Drupal::currentUser()->hasPermission('access administration pages') && node_access_needs_rebuild()) {
if ($route_name == 'system.status') {
$message = t('The content access permissions need to be rebuilt.');
}
else {
$message = t('The content access permissions need to be rebuilt. <a href="@node_access_rebuild">Rebuild permissions</a>.', array('@node_access_rebuild' => \Drupal::url('node.configure_rebuild_confirm')));
}
drupal_set_message($message, 'error');
}
This is super weird code to have in hook_help(). To be fair node_access_needs_rebuild() only hits state but the perms check is not free.
Comments
Comment #1
alexpottComment #2
dawehnerMaybe we really should just put that information into
admin/reports/statusand be kinda done then?Comment #15
salvisNo, but it would make sense to check node_access_needs_rebuild() first.
Actually, I was worried about not seeing the message because the Help module is not in the minimal setup.
Comment #17
acbramley commentedThis still exists in the OOP hook equivalent.