[x] The bug happens consistently across all tested browsers
[ ] This bug happens when using yii2-dynagrid without other plugins.
Text
Installed the DynaGrid plugin and ran into the problem of expanding it. I created my own class DynaGridViewAdvanced, which is located on the path modules/appWidgets/widgets/grid and has namespace app\modules\appWidgets\widgets\grid.
The class code is as follows:
<?php
declare(strict_types=1);
namespace app\modules\appWidgets\widgets\grid;
use kartik\dynagrid\DynaGrid;
use Yii;
use yii\helpers\Url;
class DynaGridViewAdvanced extends DynaGrid {
/**
* @var bool активность функции перехода на просмотр при двойном клике
*/
public $transitionToView = false;
public function init() {
parent::init(); // TODO: Change the autogenerated stub
if ($this->transitionToView && empty($this->rowOptions)) {
$this->rowOptions = function($model, $key, $index, $grid) {
$viewLink = Url::toRoute(['/' . Yii::$app->controller->id . '/view']);
return ['ondblclick' => 'location.href="' . $viewLink . '?id="+(this.dataset.key);'];
};
}
}
public function run() {
parent::run(); // TODO: Change the autogenerated stub
}
}
Actually, the question is why the error is thrown out and how to fix it?
View not Found – yii\base\ViewNotFoundException
The view file does not exist: /var/www/urs/modules/appWidgets/widgets/grid/views/config.php
In DynaGrid itself there is a property _module, which stores in itself kartik\dynagrid\Module, in which there is a property configView. configView is used only in DynaGrid itself:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Prerequisites
master
branch of yii2-dynagrid.Steps to reproduce the issue
modules/appWidgets/widgets/grid
Environment
Browsers
Operating System
Libraries
Isolating the problem
Text
Installed the
DynaGrid
plugin and ran into the problem of expanding it. I created my own classDynaGridViewAdvanced
, which is located on the pathmodules/appWidgets/widgets/grid
and has namespaceapp\modules\appWidgets\widgets\grid
.The class code is as follows:
Actually, the question is why the error is thrown out and how to fix it?
In
DynaGrid
itself there is a property_module
, which stores in itselfkartik\dynagrid\Module
, in which there is a propertyconfigView
.configView
is used only inDynaGrid
itself:As far as I understand the error, he is trying to find this configuration view file exactly with
namespace
.