雖然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命令而是手工方式升級。
评论