2016-07-23 105 views
1
Hello at the installation I want to change the modules directory on drupal 7 so i want to know if it possible or impossible.i want to change ../modules to ../mods/init and site/all/modules to ../mods/global 

我試着改變install.core.inc行 require_once DRUPAL_ROOT。 「/模塊/ 但是我沒有得到這樣的信息: 致命錯誤:調用未定義的函數field_attach_load()在F:\ XAMP \ htdocs中\ CMS \ PHP \ dp7_1 \包括\ entity.inc上線354更改Drupal模塊目錄

回答

2

在Drupal 7,認爲最好的做法是將模塊保存在sites/*/modules目錄中。

而且它被認爲是非常不好的做法,編輯Drupal核心的任何線路,如install.core.inc

見Drupal的「永不哈克核心」的文件https://www.drupal.org/best-practices/do-not-hack-core和他們的主要理由:

  • You will make it complicated, difficult, or nearly impossible to apply site updates such as Security and bug fixes.
  • You will make it difficult for those that come after to maintain the site.
  • You could possibly leave your site vulnerable to exploits.

這不是不可能的,但它會被認爲是一個非常糟糕的核心攻擊,會產生大量的技術債務和開銷,每次升級都會遇到這種情況,並且使其他模塊和功能(如drush)無用,而且不會對其進行攻擊。