E
E
Eugene2018-05-10 09:26:01
Yii
Eugene, 2018-05-10 09:26:01

A small glitch in the work of elfinder, who faced it?

In general, I make a news editor. Everything is fine with text, but I use Elfinder to insert images. The text itself is inserted without problems.
But here I just attached it to the field in order to select an image for the news header:

<?php echo $form->field($model, 'image')->widget(InputFile::className(), [
        'language'      => 'ru',
        'controller'    => 'elfinder',
        'filter'        => 'image',
        'template'      => '<div class="input-group">{input}<span class="input-group-btn">{button}</span></div>',
        'options'       => ['class' => 'form-control'],
        'buttonOptions' => ['class' => 'btn btn-default'],
        'multiple'      => false       // возможность выбора нескольких файлов
    ]);?>

And when you insert an image, it gives an error:
error in 'getFileCallback' Cannot read property 'preventDefault' of underfined

Although the field inserts the path in the picture and the picture loads. How can I remove this error?
5af3e5f818d64526188290.jpeg

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question