Invalid Call – yii\base\InvalidCallException
fecshop service method is not exit. fecshop\services\Helper::actionGetBaseWebsiteName
1. in /www/wwwroot/demo2.bmaxspace.com/fecmall/vendor/fancyecommerce/fecshop/services/Service.phpat line 60
51525354555657585960616263646566676869 }
if (method_exists($this, $method)) {
$this->beginCall($originMethod, $arguments);
$return = call_user_func_array([$this, $method], $arguments);
$this->endCall($originMethod, $arguments);
return $return;
} else {
throw new InvalidCallException('fecshop service method is not exit. '.get_class($this)."::$method");
}
}
/**
* 得到services 里面配置的子服务childService的实例.
*/
public function getChildService($childServiceName)
{
//var_dump($this->childService['xunSearch']);exit;
2. in /www/wwwroot/demo2.bmaxspace.com/fecmall/addons/fecmall/fecro/app/appfront/theme/fecro/widgets/header.php at line 31– fecshop\services\Service::__call()
25262728293031323334353637 </a>
</div>
<div class="position-absolute header-right-collapse-container header-right-collapse-container-js header-user-collapse-container active">
<div class="header-right-user__register-guide pa-lg-24" style="display:block">
<p class="font-bold mb-lg-5">
<?= Yii::$service->page->translate->__('Welcome to {fecmall}', ['fecmall' => Yii::$service->helper->getBaseWebsiteName() ]); ?>
</p>
<a href="<?= Yii::$service->url->getUrl('customer/account/login') ?>" class="btn btn-secondary btn-block register-guide-btn" >
<?= Yii::$service->page->translate->__('Sign in / Register'); ?>
</a>
</div>
3. in /www/wwwroot/demo2.bmaxspace.com/fecmall/vendor/yiisoft/yii2/base/View.php at line 348– require('/www/wwwroot/demo2.bmaxspace.com...')
4. in /www/wwwroot/demo2.bmaxspace.com/fecmall/vendor/yiisoft/yii2/base/View.php at line 257– yii\base\View::renderPhpFile()
5. in /www/wwwroot/demo2.bmaxspace.com/fecmall/vendor/fancyecommerce/fecshop/services/page/Widget.php at line 177– yii\base\View::renderFile()
171172173174175176177178179180181182183 $ob = Yii::createObject($config);
$params = $ob->$method();
if ($parentThis) {
$params['parentThis'] = $parentThis;
}
return Yii::$app->view->renderFile($viewFile, $params);
}
/**
* @param $configKey | string , 标记,以及报错排查时使用的key。
* @param $config,就是上面actionRender()方法中的参数,格式一样。
* @param $parentThis | array or '' , 调用层传递的参数数组,可以在view中调用。
6. in /www/wwwroot/demo2.bmaxspace.com/fecmall/vendor/fancyecommerce/fecshop/services/page/Widget.php at line 219– fecshop\services\page\Widget::renderContentHtml()
213214215216217218219220221222223224225 throw new InvalidConfigException($config['class'].' must implete fecshop\interfaces\block\BlockCache when you use block cache .');
}
}
}
// 查看 $config['class'] 是否在YiiRewriteMap重写中存在配置,如果存在,则替换
!isset($config['class']) || $config['class'] = Yii::mapGetClassName($config['class']);
$content = $this->renderContentHtml($configKey, $config, $parentThis);
return $content;
}
/**
* find theme file by mutil theme ,if not find view file and $throwError=true, it will throw InvalidValueException.
7. in /www/wwwroot/demo2.bmaxspace.com/fecmall/vendor/fancyecommerce/fecshop/services/page/Widget.php at line 81– fecshop\services\page\Widget::renderContent()
75767778798081828384858687 } else {
throw new InvalidValueException(" config key: '$configKey', can not find in ".'Yii::$service->page->widget->widgetConfig'.', you must config it before use it.');
}
}
return $this->renderContent($configKey, $config, $parentThis);
}
/**
* @param configKey String or Array
* 如果传递的是一个配置数组,内容格式如下:
* [
* # class 选填
8. in /www/wwwroot/demo2.bmaxspace.com/fecmall/addons/fecmall/fecro/app/appfront/theme/fecro/layouts/home.php at line 52– fecshop\services\page\Widget::render()
46474849505152535455565758 <?= Yii::$service->page->widget->render('base/head',$this); ?>
</head>
<body>
<?= Yii::$service->page->widget->render('base/beforeContent',$this); ?>
<?php $this->beginBody() ?>
<header id="header">
<?= Yii::$service->page->widget->render('base/header',$this); ?>
</header>
<div class="main-container">
<?= $content; ?>
</div>
<div class="footer-container">
9. in /www/wwwroot/demo2.bmaxspace.com/fecmall/vendor/yiisoft/yii2/base/View.php at line 348– require('/www/wwwroot/demo2.bmaxspace.com...')
10. in /www/wwwroot/demo2.bmaxspace.com/fecmall/vendor/yiisoft/yii2/base/View.php at line 257– yii\base\View::renderPhpFile()
11. in /www/wwwroot/demo2.bmaxspace.com/fecmall/vendor/yiisoft/yii2/base/Controller.php at line 425– yii\base\View::renderFile()
12. in /www/wwwroot/demo2.bmaxspace.com/fecmall/vendor/fancyecommerce/fecshop/app/appfront/modules/AppfrontController.php at line 99– yii\base\Controller::renderContent()
93949596979899100101102103104105 */
public function render($view, $params = [])
{
$viewFile = Yii::$service->page->theme->getViewFile($view);
$content = Yii::$app->view->renderFile($viewFile, $params, $this);
return $this->renderContent($content);
}
/**
* @param $view|string
* Get current layoutFile absolute path from mutil theme dir by protity.
* 首先在高级别的模板中找view文件,如果找不到,按照模板路径优先级依次查找
13. in /www/wwwroot/demo2.bmaxspace.com/fecmall/addons/fecmall/melaniblue_theme/app/appfront/modules/Cms/controllers/HomeController.php at line 26– fecshop\app\appfront\modules\AppfrontController::render()
202122232425262728{
// 网站信息管理
public function actionIndex()
{
$data = $this->getBlock()->getLastData();
return $this->render($this->action->id, $data);
}
}
14. fectmelaniblue\app\appfront\modules\Cms\controllers\HomeController::actionIndex()
15. in /www/wwwroot/demo2.bmaxspace.com/fecmall/vendor/yiisoft/yii2/base/InlineAction.php at line 57– call_user_func_array()
16. in /www/wwwroot/demo2.bmaxspace.com/fecmall/vendor/yiisoft/yii2/base/Controller.php at line 181– yii\base\InlineAction::runWithParams()
17. in /www/wwwroot/demo2.bmaxspace.com/fecmall/vendor/yiisoft/yii2/base/Module.php at line 528– yii\base\Controller::runAction()
18. in /www/wwwroot/demo2.bmaxspace.com/fecmall/vendor/yiisoft/yii2/web/Application.php at line 104– yii\base\Module::runAction()
19. in /www/wwwroot/demo2.bmaxspace.com/fecmall/vendor/yiisoft/yii2/base/Application.php at line 392– yii\web\Application::handleRequest()
20. in /www/wwwroot/demo2.bmaxspace.com/fecmall/appfront/web/index.php at line 66– yii\base\Application::run()
60616263646566 * 使用方法:Yii::$service->cms->article;
* 上面的例子就是获取cms服务的子服务article。
*/
new fecshop\services\Application($config);
$application = new yii\web\Application($config);
$application->run();
$_COOKIE = [
'_identity' => 'c48c0a5dae819f05a66095f12a5788a58398db20ede1a1d12e6f71ec0339b6a0a:2:{i:0;s:9:"_identity";i:1;s:44:"[1,"MPnt5thzI0EEWuc3pOaJ1cxkoGm7tCib",86400]";}',
'PHPSESSID' => '4rdtgmq933ddouiut2ilsbrs15',
'Hm_lvt_eaa57ca47dacb4ad4f5a257001a3457c' => '1606098474,1606181732,1606268338,1606354028',
'Hm_lpvt_eaa57ca47dacb4ad4f5a257001a3457c' => '1606354038',
];
$_SESSION = [
'__flash' => [],
'__id' => 1,
'current_session_cart_id' => '1',
'currency_current' => 'USD',
];