2amigos / yii2-editable-widget

X-Editable Widget for Yii2
Other
58 stars 20 forks source link

Not working after yii2 update #5

Closed iddqdidkfa closed 10 years ago

iddqdidkfa commented 10 years ago
Uncaught ReferenceError: yii is not defined

at bootstrap-editable.js line 619

tonydspaniard commented 10 years ago

@iddqdidkfa Just checked Yii assets and its namespace still there: https://github.com/yiisoft/yii2/blob/master/framework/assets/yii.js

What do you mean?

iddqdidkfa commented 10 years ago

@tonydspaniard Oh sorry, I found the problem. Not sure why but in my situation "yii.js" including after "bootstrap-editable.js"

<script src="/assets/f7834dd3/js/bootstrap-editable.js"></script>
<script src="/assets/7111a49b/yii.js"></script>

and it happened right after composer update

maybe you have to add dependency to yii\web\YiiAsset in EditableBootstrapAsset?

public $depends = [
    'yii\web\YiiAsset',
    'yii\bootstrap\BootstrapPluginAsset',
];

it works for me

P.S. created pull request

tonydspaniard commented 10 years ago

This issue is no longer valid