我有两台电脑,并安装了两个不同版本的xampp。一个有5.3.x的php版本另一个有php版本5.4.4。 我对drupal的模块名为“content access”有疑问。它在较旧版本的xampp中工作正常,但在较新版本中显示错误。 这是错误
Notice: Undefined index: type in content_access_admin_settings_submit() (line 167 of C:\xampp\htdocs\mmg\mmgsecure\sites\all\modules\content_access\content_access.admin.inc).
Notice: Undefined index: type in content_access_admin_settings_submit() (line 181 of C:\xampp\htdocs\mmg\mmgsecure\sites\all\modules\content_access\content_access.admin.inc).
Notice: Undefined index: type in content_access_admin_settings_submit() (line 181 of C:\xampp\htdocs\mmg\mmgsecure\sites\all\modules\content_access\content_access.admin.inc).
Notice: Undefined index: type in content_access_admin_settings_submit() (line 181 of C:\xampp\htdocs\mmg\mmgsecure\sites\all\modules\content_access\content_access.admin.inc).
Notice: Undefined index: type in content_access_admin_settings_submit() (line 181 of C:\xampp\htdocs\mmg\mmgsecure\sites\all\modules\content_access\content_access.admin.inc).
Notice: Undefined index: type in content_access_admin_settings_submit() (line 181 of C:\xampp\htdocs\mmg\mmgsecure\sites\all\modules\content_access\content_access.admin.inc).
Notice: Undefined index: type in content_access_admin_settings_submit() (line 181 of C:\xampp\htdocs\mmg\mmgsecure\sites\all\modules\content_access\content_access.admin.inc).
Notice: Undefined index: type in content_access_admin_settings_submit() (line 181 of C:\xampp\htdocs\mmg\mmgsecure\sites\all\modules\content_access\content_access.admin.inc).
Notice: Undefined index: type in content_access_admin_settings_submit() (line 181 of C:\xampp\htdocs\mmg\mmgsecure\sites\all\modules\content_access\content_access.admin.inc).
Notice: Undefined index: type in content_access_admin_settings_submit() (line 181 of C:\xampp\htdocs\mmg\mmgsecure\sites\all\modules\content_access\content_access.admin.inc).
Notice: Undefined index: type in content_access_admin_settings_submit() (line 181 of C:\xampp\htdocs\mmg\mmgsecure\sites\all\modules\content_access\content_access.admin.inc).
Notice: Undefined index: type in content_access_admin_settings_submit() (line 181 of C:\xampp\htdocs\mmg\mmgsecure\sites\all\modules\content_access\content_access.admin.inc).
Notice: Undefined index: type in content_access_admin_settings_submit() (line 181 of C:\xampp\htdocs\mmg\mmgsecure\sites\all\modules\content_access\content_access.admin.inc).
Notice: Undefined index: edit any content in user_role_grant_permissions() (line 3041 of C:\xampp\htdocs\mmg\mmgsecure\modules\user\user.module).
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'module' cannot be null: INSERT INTO {role_permission} (rid, permission, module) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => 3 [:db_insert_placeholder_1] => edit any content [:db_insert_placeholder_2] => ) in user_role_grant_permissions() (line 3043 of C:\xampp\htdocs\mmg\mmgsecure\modules\user\user.module).
任何人都可以帮忙解决这个问题吗?
由于
答案 0 :(得分:0)
所以,这是最糟糕的,你不应该真正做任何事情,但在user.module的第3046行,定义了查询权限的函数。如果你改变了
->fields(array(
'module' => $modules[$name]
))
到
->fields(array(
'module' => $module
))
将$ module(在db_merge()
开始之前的某处)定义为:
if (!empty($modules[$name])) {
$module = $modules[$name];
}
else {
$module = 'node'; // or features or whatever module you think is creating these permissions that aren't getting saved right
}
然后我认为你的错误会消失。
这就是所谓的黑客核心,你永远不应该这样做。
答案 1 :(得分:0)
关于这个问题有一个有用的讨论 还有一个适合我的补丁 https://drupal.org/comment/6573448#comment-6573448