我有一个Drupal 7站点,我很难找到解决以下问题的方法.
我的所有cron任务都运行良好,但搜索索引cron.它会在日志中生成此错误并停止索引.看起来它与entity_extract_ids()field.multilingual.inc中的函数有关,但我不知道从哪里开始.这是错误日志:
exception 'EntityMalformedException' with message 'Missing bundle property on entity of type node.' in /home/xxxxx/public_html/includes/common.inc:7562
Stack trace:
#0 /home/xxxxx/public_html/modules/field/field.multilingual.inc(268): entity_extract_ids('node', Object(stdClass))
#1 /home/xxxxx/public_html/modules/field/field.attach.inc(1111): field_language('node', Object(stdClass), NULL, 'en')
#2 /home/xxxxx/public_html/modules/node/node.module(1358): field_attach_prepare_view('node', Array, 'search_index', 'en')
#3 /home/xxxxx/public_html/modules/node/node.module(1284): node_build_content(false, 'search_index', 'en')
#4 /home/xxxxx/public_html/modules/node/node.module(2668): node_view(false, 'search_index')
#5 /home/xxxxx/public_html/modules/node/node.module(2650): _node_index_node(Object(stdClass))
#6 [internal function]: node_update_index()
#7 /home/xxxxx/public_html/includes/module.inc(826): call_user_func_array('node_update_ind...', Array)
#8 /home/xxxxx/public_html/modules/search/search.module(363): module_invoke('node', 'update_index')
#9 [internal function]: search_cron()
#10 /home/xxxxx/public_html/sites/all/modules/ultimate_cron/ultimate_cron.module(726): call_user_func('search_cron')
#11 [internal function]: _ultimate_cron_run_hook('search_cron', Array)
#12 /home/xxxxx/public_html/sites/all/modules/background_process/background_process.module(428): call_user_func_array('_ultimate_cron_...', Array)
#13 [internal function]: …Run Code Online (Sandbox Code Playgroud) 我正在寻找一种方法来获取一个php数组并在几个数组键之间传递值并保存到一个字符串中.
$array1 = array(0=>'sometext',
1=>'1703',
2=>'North',
3=>5th',
4=>'st',
5=>'sometext')
I know the starting key and the end key in my script
$startnum = 1;
$endnum = 4;
I need to get this
$string = '1703 North 5th st'
Run Code Online (Sandbox Code Playgroud)
不更改数组中的键,因为我必须稍后再次遍历数组.我目前正在使用数组拼接,但它删除了数组中的项和键,所以当我再次遍历数组时,键和值都搞砸了.如果我需要更好的解释,请告诉我.