经销商后台无意中点到语音切换选成了英文 请问如果恢复成中文状态
描述清楚问题
再那个入口,执行了哪些操作,产生的哪些问题,这个报错是那个入口报错的
说清楚,你是那套系统
另外报错截图就截个表头,本人不是神,这么点信息,我也不清楚是什么原因,帮不上。
fecmall多商户分销系统吧 进的appbdmin 也说了点了语音切换到英文了就报错
我测试了一下,经销商后台切换语言后,并没有报错,你是不是改动了什么东西?
你先清楚下浏览器的cookie,重新登陆试试,如果可以,再找原因。
代码文件 ./addons/fecmall/fecbbc/services/Bdmin.php
/** * 初始化后台多语言 * @throws InvalidConfigException */ protected function initLangCode(){ if (!$this->_currentLangCode) { $currentLangCode = Yii::$service->session->get(self::BDMIN_CURRENT_LANG_CODE); if (!$currentLangCode) { $currentLangCode = Yii::$service->fecshoplang->defaultLangCode; } if (!$currentLangCode) { throw new InvalidConfigException('default lang code must config'); } if ($this->setTranslateLang($currentLangCode)) { $this->_currentLangCode = $currentLangCode; } else { throw new InvalidConfigException('lang code: '.$currentLangCode.' can not find in fecshoplang service config, you should add this language config'); } } } public function getCurrentLangCode(){ if (!$this->_currentLangCode) { $this->initLangCode(); } return $this->_currentLangCode; } public function setCurrentLangCode($code){ $adminLangCode = Yii::$service->fecshoplang->getAdminLangCode(); if (in_array($code, $adminLangCode)) { Yii::$service->session->set(self::BDMIN_CURRENT_LANG_CODE, $code); $this->_currentLangCode = $code; if ($this->setTranslateLang($code)) { return true; } } return false; }
报错就是第一行函数报错的,你debug一下代码吧
我猜测,是你后台删除了语言导致的(平台后台编辑的),session中存在的语言,在函数$this->setTranslateLang($code)中找不到,返回报错。
$this->setTranslateLang($code)
你自己debug一下代码吧。
把标题改一下了:多商户系统,经销商后台切换语言报错:这些写上你的报错信息
这些写上你的报错信息
请把报错信息,写到帖子标题,否则搜不到此帖子,帖子就沉了。