腐败的Drupal菜单

时间:2014-05-03 02:27:27

标签: drupal drupal-7 drupal-navigation

运行Drupal 7.26没有任何想象力,并开始遇到菜单系统的损坏问题。我们开始看到以下错误(截断到适合)。执行drush或手动清除缓存并不能解决问题,将menu_router.weight设置为NULL是的,截断menu_links和menu_router表仍然会产生错误。链接奇怪的菜单仍然出现在网站上,但只有一些不是全部。

我怀疑这个问题可能是由带有设置路径的页面视图(使用views3)引起的,但我不明白为什么会这样,因为它只是一个正常的路径。

PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 
'weight' at row 9: INSERT INTO {menu_router} (path, load_functions, to_arg_functions, 
access_callback, access_arguments, page_callback, page_arguments, delivery_callback, fit, 
number_parts, context, tab_parent, tab_root, title, title_callback, title_arguments, 
theme_callback, theme_arguments, type, description, position, weight, include_file) VALUES 
.... (truncated) ....
(:db_insert_placeholder_184, :db_insert_placeholder_185, :db_insert_placeholder_186,     
:db_insert_placeholder_187, :db_insert_placeholder_188, :db_insert_placeholder_189, 
:db_insert_placeholder_190, :db_insert_placeholder_191, :db_insert_placeholder_192, 
:db_insert_placeholder_193, :db_insert_placeholder_194, :db_insert_placeholder_195, 
:db_insert_placeholder_196, :db_insert_placeholder_197,); Array ( 
.... (truncated) ....
[:db_insert_placeholder_180] => Ajax callback for view loading. 
[:db_insert_placeholder_181] => [:db_insert_placeholder_182] => 0 
[:db_insert_placeholder_183] => sites/all/modules/contrib/views/includes/ajax.inc 
[:db_insert_placeholder_184] => volunteering/opportunities [:db_insert_placeholder_185] => 
[:db_insert_placeholder_186] => [:db_insert_placeholder_187] => ctools_access_menu 
[:db_insert_placeholder_188] => a:1:{i:0;a:2:{s:4:"type";s:4:"none";s:8:"settings";N;}} 
[:db_insert_placeholder_189] => page_manager_page_execute [:db_insert_placeholder_190] => 
a:1:{i:0;s:13:"volunteering_";} [:db_insert_placeholder_191] => 
[:db_insert_placeholder_192] => 3 [:db_insert_placeholder_193] => 2 
[:db_insert_placeholder_194] => 0 [:db_insert_placeholder_195] => 
[:db_insert_placeholder_196] => volunteering/opportunities [:db_insert_placeholder_197] => 
Volunteering opportunities [:db_insert_placeholder_198] => t [:db_insert_placeholder_199] 
=> [:db_insert_placeholder_200] => [:db_insert_placeholder_201] => a:0:{} ) in 
_menu_router_save() (line 3837 of /var/mysite/dev/includes/menu.inc).

1 个答案:

答案 0 :(得分:0)

由于某些奇怪的原因,ctools页面管理器中的函数page_manager_list_page()> page_manager.admin.inc没有设置数字权重。不确定它是如何或为什么不检查它不是一个整数,但它不会导致这个问题。