跳转到主要内容
你行网

Main navigation

  • 首页
  • 文章
  • 教程
  • 视频
  • 下载
  • 社区
  • 网站导航
User account menu
  • 登录

面包屑

  1. 首页

drupal 7安装entityreference_prepopulate 模块后出再现代码

由 hrs, 15 十月, 2020
论坛
drupal 问答

drupal 7安装entityreference_prepopulate 模块后出再现代码

错误截图:

entityreference_prepopulate.png

错误代码

Deprecated function: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in include_once() (line 1387 of /var/www/html/includes/bootstrap.inc).
Deprecated function: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in include_once() (line 1387 of /var/www/html/includes/bootstrap.inc).
Notice: Undefined index: normal 在 flag_flag->get_link_type() (行 1214 在 /var/www/html/sites/all/modules/flag/includes/flag/flag_flag.inc).
Notice: Trying to access array offset on value of type null 在 flag_flag->options() (行 203 在 /var/www/html/sites/all/modules/flag/includes/flag/flag_flag.inc).
Warning: array_merge(): Expected parameter 2 to be an array, null given 在 flag_flag->options() (行 203 在 /var/www/html/sites/all/modules/flag/includes/flag/flag_flag.inc).
Warning: Invalid argument supplied for foreach() 在 flag_flag->construct() (行 222 在 /var/www/html/sites/all/modules/flag/includes/flag/flag_flag.inc).
Notice: Undefined index: normal 在 flag_flag->get_link_type() (行 1214 在 /var/www/html/sites/all/modules/flag/includes/flag/flag_flag.inc).
Notice: Trying to access array offset on value of type null 在 flag_flag->options() (行 203 在 /var/www/html/sites/all/modules/flag/includes/flag/flag_flag.inc).
Warning: array_merge(): Expected parameter 2 to be an array, null given 在 flag_flag->options() (行 203 在 /var/www/html/sites/all/modules/flag/includes/flag/flag_flag.inc).
Error: Unsupported operand types 在 flag_flag::factory_by_row() (行 132 在 /var/www/html/sites/all/modules/flag/includes/flag/flag_flag.inc).

解决办法:

根据drupal 官方列出的补丁修改就好!

补丁下载:https://www.drupal.org/project/entityreference_prepopulate/issues/3115641

修改方法:打开终端,进入entityreference_prepopulate 目录

cd /var/www/html/sites/all/modules/entityreference_prepopulate

修改entityreference_prepopulate.module文件

vim entityreference_prepopulate.module

把336行

if (!$form_build_id = isset($_GET['form_build_id']) ? $_GET['form_build_id'] : isset($_POST['form_build_id']) ? $_POST['form_build_id'] : NULL) {
修改为:if (!$form_build_id = (isset($_GET['form_build_id']) ? $_GET['form_build_id    '] : isset($_POST['form_build_id'])) ? $_POST['form_build_id'] : NULL) { 

wq 保存即可!!

  • 登录或注册以发表评论

相关文章

RSS源
本站由阿里云强力驱动,幸运券优惠链接
Copyright © 2019 - 2021 你行网 版权所有  粤ICP备19072650号