0

我有两台电脑,安装了两个不同版本的 xampp 。一个具有 5.3.x 的 php 版本,另一个具有 5.4.4 的 php 版本。我对名为“内容访问”的 drupal 模块有问题。它在旧版本的 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).

任何人都可以帮助解决这个问题吗?

谢谢

4

2 回答 2

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
}

那么我认为你的错误会消失。

这就是所谓的黑客核心,你永远不应该这样做。

于 2013-04-03T21:50:35.410 回答