ankitr
ankitr

Reputation: 6172

uncaught exception: [CKEDITOR.resourceManager.load] Resource name "default" was not found

I have installed CKEditor widget from yii2-ckeditor-widget using composer. Install was successful, there was no error.

Here is my view file:

use dosamigos\ckeditor\CKEditor;

.....

<?php echo $form->field($model, 'content')->widget(CKEditor::className(), [
    'options' => ['rows' => 6],
    'preset' => 'basic'
]) ?>

when I see in browser, there is nothing in the place of CKEditor in the form. I checked console message in firebug I found this.

enter image description here

while without CKEditor it is working fine

<?php echo $form->field($model, 'content')->textarea(['rows'=>6]) ?>

Am I missing something?

EDIT: I posted this as an issue on github and here is what I got:

It seems that your issue is related to the assets registration.

I do not know what is the issue with asset registration? Any suggestion?

Upvotes: 1

Views: 6377

Answers (2)

Jeroen
Jeroen

Reputation: 1166

I was struggling with the same problem, I managed to solve this by making a hard copy of the assets in the web folder.

$ php app/console assets:install

For more info check: Symfony 2.6: Smarter assets:install command

Upvotes: 0

ankitr
ankitr

Reputation: 6172

There was problem with asset registration. I Kdiff current asset directory with another projects asset directory. And there was files missing I copied them in current project and now its running fine.

Upvotes: 2

Related Questions