2016-07-23 126 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)无用,而且不会对其进行攻击。