虽然Drupal 8出来大半年了,但我们依然以Drupal 7为主,先前用的7.43已经好几个月了,现在出了安全更新Drupal 7.52,就照例进行了更新,有几点稍微不同的地方记录一下:
部分网站升级后用户浏览没有问题,但管理员界面发现大量的报错:
The following module has moved within the file system: <em class="placeholder">views_bulk_operations</em>. In order to fix this, clear caches or [warning] put the module back in its original location. For more information, see <a href=" https://www.drupal.org/node/2487215">the documentation page</a>. bootstrap.inc:1128 The following module has moved within the file system: <em class="placeholder">actions_permissions</em>. In order to fix this, clear caches or [warning] put the module back in its original location. For more information, see <a href=" https://www.drupal.org/node/2487215">the documentation page</a>. bootstrap.inc:1128
查看帮助文档,说是以前曾经安装过的旧模块现在在目录路径中找不到了,而数据库中还存在,这样会导致Drupal不断查找对应的目录从而降低性能,所以有了这个提示。解决的办法可以是重新安装找不到的模块、然后正常卸载;也可以直接从数据库表中删除对应的项。我们是采用drush来批量删除的:
$d sql-query "DELETE from system where name = 'views_bulk_operations' AND type = 'module';" $d sql-query "DELETE from system where name = 'actions_permissions' AND type = 'module';"
还有少量情况即使这样删除后依然有报错User warning: The following module is missing from the file system: content,是因为有一些模块包含了调用老模块的语句,可以去修改或者更新,例如带有购物车的网站中Ubercart模块需要升级到最新版本以免依然有报错信息。
另外还有一种报错:
4 byte UTF-8 for mysql is not activated, but it is supported on your system. It is recommended that you enable this to allow 4-byte UTF-8 input [warning] such as emojis, Asian symbols and mathematical symbols to be stored correctly. See the documentation on adding 4 byte UTF-8 support for more information. (Currently using Database 4 byte UTF-8 support Not enabled)
这是Drupal 7.5x后增加了对多字节utf-8的数据库支持,以便保存表情符号、亚洲符号、数学符号等字符,如果没有这些内容可以不改,如果需要增加对这些的支持可以修改现有的表或者新建库。具体请看我的另外一篇博客文章:《Drupal网站utf8转为utf8mb4支持表情等特殊字符》。
此外,国内服务器上使用drush update升级的时候遇到报错说无法下载需要的drupal模块文件,估计又是遇到什么墙了,只好不用drush命令而是手工方式升级。
评论