CostaRico / yii2-images

Yii2-images - behavior-based module for resizing, storing, caching and attaching images.
160 stars 98 forks source link

После обновления getUrl создает странную ссылку #72

Open alex290 opened 6 years ago

alex290 commented 6 years ago

После обновления getUrl создает странную ссылку в итоге ссылка несуществует Например /5/images/image-by-item-and-alias?item=Slider1&dirtyAlias=16a1585d57-1_2048x490.jpg

Я так понимаю первая цифра это id материала

А вот getPath работает нормально

vavilin commented 6 years ago

На текущем комите (ac4e15f2fdd01019c3c2edd2ba90e71138370dc3) не работает. Проблема осталась

ygrigoriev commented 6 years ago

I have the same issue - it doesn't work for me on current mainline with Yii2 v. 2.0.13.1. It generates invalid image url request to which fails with 404. Url sample: /114/images/image-by-item-and-alias?item=Advert4690180565777482888&dirtyAlias=9947f6d2ab-1.jpg

zeyser commented 6 years ago

I think here was broken module behavior. I added to urlManager rule '<id:([0-9])+>/images/image-by-item-and-alias' => 'yii2images/images/image-by-item-and-alias' and it seems to be working... But I'm not sure this is a good approach. P.S. I think changes like this must be marked in documentation!

TreeHouse98 commented 6 years ago

Hello, i have a seem problem like /2/images/image-by-item-and-alias?item=Product4&dirtyAlias=368da602e2-1.png , how to fix this? I very need it, help please

dpotekhin commented 6 years ago

Same problem :( quick fix is to change '/'.$this->getPrimaryKey().'/images/image-by-item-and-alias', to '/yii2images/images/image-by-item-and-alias', or back to '/'.$this->getModule()->id.'/images/image-by-item-and-alias', in vendor\costa-rico\yii2-images\models\Image.php

artmarkov commented 6 years ago

Same problem with getUrl (). Let's finally do this shit.

AndreyTSpb commented 5 years ago

Same problem :( quick fix is to change '/'.$this->getPrimaryKey().'/images/image-by-item-and-alias', to '/yii2images/images/image-by-item-and-alias', or back to '/'.$this->getModule()->id.'/images/image-by-item-and-alias', in vendor\costa-rico\yii2-images\models\Image.php

Thanks you. Helped to fix this problem.

ashifin72 commented 4 years ago

Получается только vendor\costa-rico\yii2-images\models\Image.php нужно править '/'.$this->getPrimaryKey().'/images/image-by-item-and-alias', меняем на '/'.$this->getModule()->id.'/images/image-by-item-and-alias', но для yii advanced приходится для вывода все же использовать filePath