Drupal:重建权限需要多长时间
我刚刚安装了 ACL 和 内容访问模块。启用它们后,我立即被要求重建权限。有人告诉我,一切都很正常。
但是,我设置了大约 40 分钟前运行的“重建”权限页面,但它仍然显示“正在初始化”。 需要多长时间?我做错了什么吗?
I have just installed the ACL and Content Access module. Imedietly after enabling them I was asked to rebuild the permissions. All perfectly normal I am told.
However, I set the 'rebuild' permissions page running about 40 minutes ago and it still says 'Initializing'. How long should it take? Am I doing something wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
标准“重建权限”持续时间大致与节点数量乘以启用的访问模块数量成正比。
在拥有 10 万个节点的站点上,您很容易需要超过 24 小时来重建权限。这意味着您根本不想以交互方式进行操作。但是您可以从 drush 启动重建或使用更快的非标准重建方法之一。
The standard "rebuild perms" duration is roughly proportional to the number of node multiplied by the number of access modules enabled.
On a site with 100k nodes, you can easily take more than 24hours to rebuild permissions. Which means you simply don't want to do it interactively. But you can launch that rebuild from drush or use one of the faster non-standard rebuild methods.
要通过 drush 执行此操作,请使用:
drush php-eval 'node_access_rebuild();'
To do it via drush, use:
drush php-eval 'node_access_rebuild();'
只需刷新页面即可。权限会在几秒钟内重建:)。
Just refresh the page. The perms get rebuilt in a few seconds :).
注意:如果您需要 24 小时才能在具有 100K 节点的站点上进行重建,则说明出现了问题。我们在 FWIW 超过 200K 的网站上花费了大约 30 分钟。对于较小的站点,它应该少得多;我怀疑您遇到了某种错误。
Note: If it takes you 24 hours to rebuild on a site with 100K nodes, something is wrong. It takes us about 30min on a site with 200K+ FWIW. For a smaller site it should be much less; I suspect you were experiencing an error of some kind.
一个快速的解决方案可以是将您的主题更改回默认的 GARLAND 主题,然后再次尝试重建权限,很可能它会起作用。有时是 JS 错误导致它卡在初始化上。
如果您的站点有太多数据(像 100k 、 200K 这样的节点),您也可以通过将其放置在 Drupal 根目录中的 php 文件中并运行来使用此脚本。 标题下
该代码位于WSODs Due to Specific Modules -> 节点访问
。在此链接上的
: http://drupal.org/node/158043
A quick solution can be just change your theme back to default GARLAND theme and than try again rebuilding permissions, most probably it will work. As sometime it is JS errors which is causing it to stuck on Initialization.
And if your site has too much data (node like 100k , 200K) you can also use this script by placing it in a php file in Drupal root and running it. The code is under the heading
WSODs Due to Specific Modules -> Node Access
on this link :
http://drupal.org/node/158043