Open anashasabelnabi opened 4 years ago
it is outside of the extension… - looks like the object on which you are trying to get behavior is null
Error is done but still not printing anything i use foreach in index view of product controller which have model Product <?php
foreach($model->getBehavior('galleryBehavior')->getImages() as $image) {
echo Html::img($image->getUrl('medium'));
}
?></b>
from my understanding of what is happening, it looks like $model
is null in when trying to use in a view, probably there is something wrong in the controller when loading it
Do you have zoom account ?
Controller , model , view to show uploaded image , view to upload image
i already do all of this tutorial but when i need to get uploaded image an error occurred Call to a member function getBehavior() on null <?php foreach($model->getBehavior('galleryBehavior')->getImages() as $image) { echo Html::img($image->getUrl('medium')); } ?>