kartik-v / yii2-markdown

Advanced Markdown editing and conversion utilities for Yii Framework 2.0
http://demos.krajee.com/markdown
Other
89 stars 41 forks source link

PHP Fatal Error – yii\base\ErrorException Class 'kartik\widgets\AssetBundle' not found #38

Closed shreyas787 closed 9 years ago

shreyas787 commented 9 years ago

Web.php

'modules' => [ 'gridview' => [ 'class' => '\kartik\grid\Module', ], ],

view/index.php

$array = array( 0=>array( "Conference"=>4647, "CallerIDNum"=>0046856202564, "CallerIDName"=>0046856202564, ) );

      $dataproviderTest = new ArrayDataProvider([
                    'allModels' => $array,
                    'sort'=>[
                    'attributes'=>['Conference','CallerIDNum','CallerIDName',]],
                    //'Event','ActionID','UserNumber','Channel','Admin','MarkedUser',,'Talking'
                    'pagination'=>[
                    'pageSize'=>10,
               ],
            ]);

      $gridColumns = [
            ['class' => 'yii\grid\SerialColumn'],
                'Conference',
                [
                    'attribute' => 'CallerIDNum',
                    'label' => 'Caller Number',
                ],
                [
                    'attribute' => 'CallerIDName',
                    'label' => 'Caller Name',
                ],

        ];

        // Renders a export dropdown menu
        echo ExportMenu::widget([
            'dataProvider' => $dataproviderTest,
            'columns' => $gridColumns
        ]);

        // You can choose to render your own GridView separately
        echo \kartik\grid\GridView::widget([
            'dataProvider' => $dataproviderTest,
           // 'filterModel' => $searchModel,
            'columns' => $gridColumns
        ]);

I have installed the widget and also tried different ways to fix this like reinstal steps given in some forums.

But still having the following error.

PHP Fatal Error – yii\base\ErrorException

Class 'kartik\widgets\AssetBundle' not found

  1. in /var/www/html/pbx/pbx/asterisk/vendor/kartik-v/yii2-export/ExportMenuAsset.php at line 20 11121314151617181920212223242526272829use kartik\widgets\AssetBundle;

/**

I have tried different widget from kartik but no luck to use them fully.

kartik-v commented 9 years ago

Wrong repo for posting. This is the yii2-markdown while your query is related to yii2-export repo. Also note that it seems you have outdated versions of the repo.

Before raising an issue ensure you have the updated packages and cross check if they tally with the source on github. The ExportMenuAsset for example does not extend from kartik\widgets\AssetBundle on yii2-export.