Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
alex290 opened this issue Nov 22, 2017 · 8 comments

Comments

@alex290
Copy link

alex290 commented Nov 22, 2017

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

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

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

cheaterBY added a commit to cheaterBY/yii2-images that referenced this issue Nov 23, 2017
@vavilin
Copy link

vavilin commented Dec 24, 2017

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

@ygrigoriev
Copy link

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
Copy link

zeyser commented Jan 21, 2018

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
Copy link

TreeHouse98 commented Mar 7, 2018

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
Copy link

dpotekhin commented May 24, 2018

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
Copy link

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

@AndreyTSpb
Copy link

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
Copy link

ashifin72 commented Oct 21, 2019

Получается только 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants