CTOlet / yii2-attachments

Yii2 extension for uploading and attaching the files to the models
66 stars 57 forks source link

AttachmentsInput and AttachmentsTable do not display #64

Open larry-tx opened 6 years ago

larry-tx commented 6 years ago

I've used nemmo/yii2-attachments successfully for a considerable amount of time. A few days ago, after running composer update, suddenly, <?= \nemmo\attachments\components\AttachmentsTable::widget(['model' => $model]) ?> and

    <?= \nemmo\attachments\components\AttachmentsInput::widget([
        'id' => 'file-input', // Optional
        'model' => $model,
        'options' => [ // Options of the Kartik's FileInput widget
            'multiple' => true, // If you want to allow multiple upload, default to false
        ],
        'pluginOptions' => [ // Plugin options of the Kartik's FileInput widget
            'maxFileCount' => 10 // Client max files
        ]
    ]) ?>

have ceased to display in the input form. There is nothing there. I've checked the page source, and there isn't even any reference to the code for either for these structures in the page source.

Looking at the runtime/log, I find the following embedded in the meswsaging:

Error: Class 'common\modules\healthlog\models\nemmo\attachments\behaviors\FileBehavior' not found in W:\xampp\htdocs\public_html\common\modules\healthlog\models\HealthLogAppointment.php:31

Obviously, somehow, the route to the model the view _form.php is built on has become embedded in the path to the extension. I went back to the declaration of the 'attachments' in common\config\main.php and the declarion of the behavior in the model, and literally copied and pasted each from your instructions. That didn't change anything. Still, noting displays in _form.php for the model.

I suppose I could try more explicitly expressing the path using @vendor, but I'm hoping you can guide me in an appropriate direction.