I am using multidomain site .
After adding a new domain record,
I was asked as follows: Content access permission needs to be rebuilt on this page.
When I clicked on Rebuild Permissions button, the progress bar started the batch operation of rebuilding but in the midway it stopped and gave an error given below
Rebuilding Content Access Permissions
An error has occurred. Please continue to the error page An HTTP error 0 occurred. /index.php?q=batch&id=433&op=do
I then searched an found an issue similar to the above in the link given below
https://www.drupal.org/node/399572
I found many solutions from above like :
- Run rebuild permission via cron (did not try)
- change theme and move to older jquery version (did not try as its live site) I checked the settings for jquery update and had "minified" instead of "none", once set to the correct setting, it worked within seconds.
I was using jQuery update module with jQuery 1.4. This causes the batch to not update.
(did not try) To fix it, you have to prevent newer jQuery from loading when the URI contains "batch".
<?php function node_access_rebuild($batch_mode = FALSE) { db_query("DELETE FROM {node_access}"); // Only recalculate if the site is using a node_access module. if (count(module_implements('node_grants'))) { // if ($batch_mode) { if (FALSE) { $batch = array( 'title' => t('Rebuilding content access permissions'), 'operations' => array( array('_node_access_rebuild_batch_operation', array()), ), 'finished' => '_node_access_rebuild_batch_finished' ); batch_set($batch); } ?>
Not sure why this is happening to me, but I've found that I can just force node_access_rebuild() to not use batch mode by changing line 2314 of node.module from:
In node.module this piece of code, is setting time limit to 240 secs which might be still low than ur php.ini. You can try increasing set_time_limit arg to 1000 and then changing it back to 240 to keep code consistent.
if (!ini_get('safe_mode')) { set_time_limit(240); } $result = db_query("SELECT nid FROM {node}"); while ($node = db_fetch_object($result)) { $loaded_node = node_load($node->nid, NULL, TRUE); // To preserve database integrity, only aquire grants if the node // loads successfully. if (!empty($loaded_node)) { node_access_acquire_grants($loaded_node); } } } }
What I tried was increased the max_execution_time from 30 to 1000? But still it did not solve the problem Then finally I tried rebuilding permissions via drush
using drush command
drush php-eval 'node_access_rebuild();'
But that gave me the following error as shown below
PHP Fatal error: Maximum execution time of 240 seconds exceeded in
sites/all/modules/me mcache/memcache.inc on line 353
Does the above error means this is something to with memcache and will it be worth trying to disable the memcache and then perform rebuilding node access?
http://example.com/index.php?q=admin/content/node-settings/rebuild
xdebug
. Or turning memcache off and rebuild, in case it actually happens to be it's fault. First would take quite a bit of time. Later would either be fast, or a complete waste of time.