Copied! Copy Stacktrace Search Stackoverflow Search Google Exception

Unknown Classyii\base\UnknownClassException

Unable to find 'app\widgets\SideNavigationWidget' in file: /web/www/www.ybcjtjt.com/frontend/widgets/SideNavigationWidget.php. Namespace missing?

  • 1. in /web/www/www.ybcjtjt.com/vendor/yiisoft/yii2/BaseYii.php at line 296
    287288289290291292293294295296297298299300301302303304305
                                        return;
                }
            } else {
                return;
            }
     
            include $classFile;
     
            if (YII_DEBUG && !class_exists($className, false) && !interface_exists($className, false) && !trait_exists($className, false)) {
                throw new UnknownClassException("Unable to find '$className' in file: $classFile. Namespace missing?");
            }
        }
     
        /**
         * Creates a new object using the given configuration.
         *
         * You may view this method as an enhanced version of the `new` operator.
         * The method supports creating an object based on a class name, a configuration array or
         * an anonymous function.
                    
  • 2. yii\BaseYii::autoload('app\widgets\SideNavigationWidget')
  • 3. in /web/www/www.ybcjtjt.com/frontend/views/video/index.php at line 18 – spl_autoload_call('app\widgets\SideNavigationWidget')
    12131415161718192021222324
                        		<div class="uk-grid fc-grid">
    			<div class="uk-width-1-1 fc-width-1-1">
    				<div class="uk-grid uk-grid-medium">
                        <div class="uk-width-1-4 fc-width-1-4">
                        <?php 
                            use app\widgets\SideNavigationWidget;
                            echo SideNavigationWidget::widget(['args'=>[]]);
                        ?>
                        </div>
                        <div class="uk-width-3-4 fc-width-3-4">
                            <?php
                                use yii\widgets\Breadcrumbs;
                                echo Breadcrumbs::widget($breadcrumb);
                    
  • 4. in /web/www/www.ybcjtjt.com/vendor/yiisoft/yii2/base/View.php at line 336 – require('/web/www/www.ybcjtjt.com/fronten...')
    330331332333334335336337338339340341342
                            {
            $_obInitialLevel_ = ob_get_level();
            ob_start();
            ob_implicit_flush(false);
            extract($_params_, EXTR_OVERWRITE);
            try {
                require $_file_;
                return ob_get_clean();
            } catch (\Exception $e) {
                while (ob_get_level() > $_obInitialLevel_) {
                    if (!@ob_end_clean()) {
                        ob_clean();
                    }
                    
  • 5. in /web/www/www.ybcjtjt.com/vendor/yiisoft/yii2/base/View.php at line 254 yii\base\View::renderPhpFile('/web/www/www.ybcjtjt.com/fronten...', ['breadcrumb' => ['activeItemTemplate' => '<li class="uk-active">{link}</li...', 'homeLink' => ['label' => '首页', 'url' => ['/']], 'options' => ['class' => 'uk-breadcrumb', 'style' => 'margin-top:10px;border-radius:5p...'], 'links' => [['label' => '视频列表', 'url' => ['video/']]]], 'sliders' => [common\models\PageSlider, common\models\PageSlider], 'pagination' => yii\data\Pagination, 'lists' => [common\models\Video]])
    248249250251252253254255256257258259260
                                            $this->renderers[$ext] = Yii::createObject($this->renderers[$ext]);
                    }
                    /* @var $renderer ViewRenderer */
                    $renderer = $this->renderers[$ext];
                    $output = $renderer->render($this, $viewFile, $params);
                } else {
                    $output = $this->renderPhpFile($viewFile, $params);
                }
                $this->afterRender($viewFile, $params, $output);
            }
     
            array_pop($this->_viewFiles);
            $this->context = $oldContext;
                    
  • 6. in /web/www/www.ybcjtjt.com/vendor/yiisoft/yii2/base/View.php at line 156 yii\base\View::renderFile('/web/www/www.ybcjtjt.com/fronten...', ['breadcrumb' => ['activeItemTemplate' => '<li class="uk-active">{link}</li...', 'homeLink' => ['label' => '首页', 'url' => ['/']], 'options' => ['class' => 'uk-breadcrumb', 'style' => 'margin-top:10px;border-radius:5p...'], 'links' => [['label' => '视频列表', 'url' => ['video/']]]], 'sliders' => [common\models\PageSlider, common\models\PageSlider], 'pagination' => yii\data\Pagination, 'lists' => [common\models\Video]], frontend\controllers\VideoController)
    150151152153154155156157158159160161162
                             * @throws InvalidCallException if the view cannot be resolved.
         * @see renderFile()
         */
        public function render($view, $params = [], $context = null)
        {
            $viewFile = $this->findViewFile($view, $context);
            return $this->renderFile($viewFile, $params, $context);
        }
     
        /**
         * Finds the view file based on the given view name.
         * @param string $view the view name or the [path alias](guide:concept-aliases) of the view file. Please refer to [[render()]]
         * on how to specify this parameter.
                    
  • 7. in /web/www/www.ybcjtjt.com/vendor/yiisoft/yii2/base/Controller.php at line 384 yii\base\View::render('index', ['breadcrumb' => ['activeItemTemplate' => '<li class="uk-active">{link}</li...', 'homeLink' => ['label' => '首页', 'url' => ['/']], 'options' => ['class' => 'uk-breadcrumb', 'style' => 'margin-top:10px;border-radius:5p...'], 'links' => [['label' => '视频列表', 'url' => ['video/']]]], 'sliders' => [common\models\PageSlider, common\models\PageSlider], 'pagination' => yii\data\Pagination, 'lists' => [common\models\Video]], frontend\controllers\VideoController)
    378379380381382383384385386387388389390
                             * These parameters will not be available in the layout.
         * @return string the rendering result.
         * @throws InvalidArgumentException if the view file or the layout file does not exist.
         */
        public function render($view, $params = [])
        {
            $content = $this->getView()->render($view, $params, $this);
            return $this->renderContent($content);
        }
     
        /**
         * Renders a static string by applying a layout.
         * @param string $content the static string being rendered
                    
  • 8. in /web/www/www.ybcjtjt.com/frontend/controllers/VideoController.php at line 61 yii\base\Controller::render('index', ['breadcrumb' => ['activeItemTemplate' => '<li class="uk-active">{link}</li...', 'homeLink' => ['label' => '首页', 'url' => ['/']], 'options' => ['class' => 'uk-breadcrumb', 'style' => 'margin-top:10px;border-radius:5p...'], 'links' => [['label' => '视频列表', 'url' => ['video/']]]], 'sliders' => [common\models\PageSlider, common\models\PageSlider], 'pagination' => yii\data\Pagination, 'lists' => [common\models\Video]])
    55565758596061626364656667
                         
            $view['pagination'] = $pagination;
            $view['lists'] = $query->offset($pagination->offset)
                ->limit($pagination->limit)
                ->all();
     
            return $this->render($this->action->id,$view);
        }
     
        /**
         * 展示
         */
        public function actionShow()
                    
  • 9. frontend\controllers\VideoController::actionIndex()
  • 10. in /web/www/www.ybcjtjt.com/vendor/yiisoft/yii2/base/InlineAction.php at line 57 – call_user_func_array([frontend\controllers\VideoController, 'actionIndex'], [])
    515253545556575859
                                $args = $this->controller->bindActionParams($this, $params);
            Yii::debug('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()', __METHOD__);
            if (Yii::$app->requestedParams === null) {
                Yii::$app->requestedParams = $args;
            }
     
            return call_user_func_array([$this->controller, $this->actionMethod], $args);
        }
    }
                    
  • 11. in /web/www/www.ybcjtjt.com/vendor/yiisoft/yii2/base/Controller.php at line 157 yii\base\InlineAction::runWithParams(['r' => 'video'])
    151152153154155156157158159160161162163
                                }
     
            $result = null;
     
            if ($runAction && $this->beforeAction($action)) {
                // run the action
                $result = $action->runWithParams($params);
     
                $result = $this->afterAction($action, $result);
     
                // call afterAction on modules
                foreach ($modules as $module) {
                    /* @var $module Module */
                    
  • 12. in /web/www/www.ybcjtjt.com/vendor/yiisoft/yii2/base/Module.php at line 528 yii\base\Controller::runAction('', ['r' => 'video'])
    522523524525526527528529530531532533534
                                $parts = $this->createController($route);
            if (is_array($parts)) {
                /* @var $controller Controller */
                list($controller, $actionID) = $parts;
                $oldController = Yii::$app->controller;
                Yii::$app->controller = $controller;
                $result = $controller->runAction($actionID, $params);
                if ($oldController !== null) {
                    Yii::$app->controller = $oldController;
                }
     
                return $result;
            }
                    
  • 13. in /web/www/www.ybcjtjt.com/vendor/yiisoft/yii2/web/Application.php at line 103 yii\base\Module::runAction('video', ['r' => 'video'])
    979899100101102103104105106107108109
                                    $params = $this->catchAll;
                unset($params[0]);
            }
            try {
                Yii::debug("Route requested: '$route'", __METHOD__);
                $this->requestedRoute = $route;
                $result = $this->runAction($route, $params);
                if ($result instanceof Response) {
                    return $result;
                }
     
                $response = $this->getResponse();
                if ($result !== null) {
                    
  • 14. in /web/www/www.ybcjtjt.com/vendor/yiisoft/yii2/base/Application.php at line 386 yii\web\Application::handleRequest(yii\web\Request)
    380381382383384385386387388389390391392
                            {
            try {
                $this->state = self::STATE_BEFORE_REQUEST;
                $this->trigger(self::EVENT_BEFORE_REQUEST);
     
                $this->state = self::STATE_HANDLING_REQUEST;
                $response = $this->handleRequest($this->getRequest());
     
                $this->state = self::STATE_AFTER_REQUEST;
                $this->trigger(self::EVENT_AFTER_REQUEST);
     
                $this->state = self::STATE_SENDING_RESPONSE;
                $response->send();
                    
  • 15. in /web/www/www.ybcjtjt.com/frontend/web/index.php at line 17 yii\base\Application::run()
    11121314151617
                            require __DIR__ . '/../../common/config/main.php',
        require __DIR__ . '/../../common/config/main-local.php',
        require __DIR__ . '/../config/main.php',
        require __DIR__ . '/../config/main-local.php'
    );
     
    (new yii\web\Application($config))->run();
                    
  • $_GET = [
        'r' => 'video',
    ];