我在Drupal7网站上,我不习惯Drupal。当我编辑节点(标准页面)并尝试保存它时,菜单消失。并非所有节点都是这样的,只有使用热图字段组的节点,可能是自定义字段组(旧版)。
系统规格如下:
CentOS 6.6
Apache 2.2
Mysql 5.5
Php 7
起初,我认为这是Drupal 7中的一个错误,我尝试了Menu items disappearing in Drupal 7的解决方案。但建议的解决方案不起作用。所以我开始怀疑post_max_size
或memory_limit
,因为当使用字段或字段组时,自定义字段的表单会变得非常大。所以我已经对内存设置进行了最大化,看起来不错,但仍然无法正常工作。
字段组数组往往非常大,我试图在帖子中找到一些关于嵌套级别太大的信息,但没有找到提示。
帖子大小是:
post_max_size in bytes = 536870912
post CONTENT_LENGTH = 1020347
该字段组包含带有地理位置的热图和无穷无尽的数据:
[field_heatmap_data] => Array
(
[und] => Array
(
[0] => Array
(
[tablefield] => Array
(
[cell_0_0] => X
[cell_0_1] => Y
[cell_0_2] => Plastic
[cell_0_3] => Paper
[cell_0_4] => Glass
[cell_0_5] => Metal
[cell_0_6] => Organiskt
[cell_0_7] =>
[cell_0_8] =>
[cell_0_9] => Other
[cell_1_0] => 14.1741233638
[cell_1_1] => 57.7797089972
[cell_1_2] => 0
[cell_1_3] => 0
[cell_1_4] =>
[cell_1_5] =>
[cell_1_6] =>
[cell_1_7] => 1
[cell_1_8] =>
[cell_1_9] => 2
[cell_2_0] => 14.1784435935
[cell_2_1] => 57.7797106709
[cell_2_2] => 0
[cell_2_3] => 0
[cell_2_4] =>
[cell_2_5] =>
[cell_2_6] =>
[cell_2_7] =>
[cell_2_8] =>
[cell_2_9] =>
[cell_3_0] => 14.1656472109
[cell_3_1] => 57.7831198751
[cell_3_2] => 1
[cell_3_3] => 2
[cell_3_4] => 1
[cell_3_5] => 1
[cell_3_6] =>
[cell_3_7] =>
[cell_3_8] =>
[cell_3_9] =>
[cell_4_0] => 14.1753179083
[cell_4_1] => 57.7826699822
[cell_4_2] => 0
[cell_4_3] => 5
[cell_4_4] =>
[cell_4_5] => 3
[cell_4_6] =>
[cell_4_7] => 9
[cell_4_8] => 4
[cell_4_9] =>
[cell_5_0] => 14.1602465906
[cell_5_1] => 57.7824661754
[cell_5_2] => 2
[cell_5_3] => 0
[cell_5_4] => 1
[cell_5_5] =>
[cell_5_6] =>
[cell_5_7] => 4
[cell_5_8] =>
[cell_5_9] => 1
[cell_6_0] => 14.1552312791
[cell_6_1] => 57.7788985858
[cell_6_2] => 0
[cell_6_3] => 1
[cell_6_4] =>
[cell_6_5] => 1
[cell_6_6] =>
[cell_6_7] => 4
[cell_6_8] =>
[cell_6_9] =>
[cell_7_0] => 14.1631063952
[cell_7_1] => 57.7813178687
[cell_7_2] => 1
[cell_7_3] => 0
[cell_7_4] =>
[cell_7_5] =>
[cell_7_6] =>
[cell_7_7] => 2
[cell_7_8] => 3
[cell_7_9] =>
[cell_8_0] => 14.1742044644
[cell_8_1] => 57.7827544419
[cell_8_2] => 0
[cell_8_3] => 0
[cell_8_4] =>
[cell_8_5] =>
[cell_8_6] =>
[cell_8_7] => 4
[cell_8_8] => 1
[cell_8_9] =>
[cell_9_0] => 14.157952438
[cell_9_1] => 57.7818974962
[cell_9_2] => 2
[cell_9_3] => 4
[cell_9_4] => 5
[cell_9_5] => 1
[cell_9_6] =>
[cell_9_7] => 8
[cell_9_8] => 2
[cell_9_9] =>
[cell_10_0] => 14.1706946744
[cell_10_1] => 57.7815507326
[cell_10_2] => 0
[cell_10_3] => 0
[cell_10_4] =>
依旧......
所以我发现节点的体系结构存在缺陷,因为它无法在字段组中处理那么多数据并且应该作为一个单独的节点处理,但由于这是一个遗留项目我不要搞砸了。
如果我在编辑时var_dump
不同页面上的$_POST
变量,我可以清楚地看到$_POST
变量在有$_POST['field_heatmap']
元素的数据后停止,而$_POST
数组之后的$_POST['field_heatmap']
数组不包含该字段组中的数据的页面。
所以我的问题是,我应该继续尝试在Drupal中找到一个错误,还是应该进一步调查一些php设置(或者也许是apache)。我试过用cachegrind调试但是找不到任何异常。或者任何提示都非常感谢!
答案 0 :(得分:1)
最后! max_input_vars
设置为1000
将其更改为max_input_vars = 10000
并且有效!