Describe the bug
Uploading an image ("texture") to an attribute that have a color code saved will save the image value but remove the image which will return a 404 in the front office. Essentially it has saved the value for the attribute, but since the color code is set it removes the image. If we repeat the process, empty the color code, choose our image and then save, it now works.
To Reproduce
[Part 1] Steps to reproduce the behavior:
#ffffff
[Part 2] Steps to reproduce the behavior:
#ffffff
but it will also be looking for the image since I _it's value_ seems to be stored in the database..../img/co/8.jpg
.[Part 3] Steps to reproduce the behavior:
Additionnal information
PrestaShop version: 1.7.4.2
Hi @dennispw,
Thanks for your report.
In the Part2 first step, I edit the attribute and upload an image (keep the color code) => OK => but this image is not saved.
I attached a video record.
https://drive.google.com/file/d/1mjDw42NDE0WTyr7grgVvWnJJUgxGu7oT/view
Thanks to check & feedback.
Best regards, Khouloud
@khouloudbelguith Precisely. But some value is still saved because in the front office (I used the faceted search as an example) it's trying to get the image but since it doesn't exist you will get a 404. I'm just _guessing here_ but it seems as if the function uploads and renames the image, saves the name - but since the color field isn't empty it deletes the image but not the entry in the database. Unfortunately debunking that specific part is above my head.
Hi @dennispw,
Could you please try to regenerate the file .htaccess
Thanks to check and feedback
Best regards, Khouloud
@khouloudbelguith It makes no difference in my case.
Hi @dennispw,
Could you try to make a small video of this issue please? It would help us to reproduce it.
Best regards, Khouloud
@khouloudbelguith See attached.
Hi @dennispw,
I attached a screen record.
https://drive.google.com/file/d/1918Hsh4npU7OdThhP3kGGFege4vsmY1S/view
Thanks to check & feedback.
Best regards, Khouloud
@khouloudbelguith It's strange you don't get the 404. However, the real issue is that the texture is removed when entering a color code and/or not even uploaded when there is a color code entered.
It should either:
Hi @dennispw,
So, this is an improvement issue.
When we try to upload a texture and the Color value is not empty. a green alert is displayed "Successful update." but the texture is not uploaded.
@marionf @colinegin what do you think of his suggestion?
Best regards, Khouloud
Hi,
As described by @kpodemski, in this ticket https://github.com/PrestaShop/PrestaShop/issues/12504.
In the PS1.6.1.23, I checked that texture have higher priority
https://drive.google.com/file/d/15-EQW5rmCKkjzIlJbFJJBdEzd8lOTim3/view
But with PS1.7, the color has a higher priority.
@marionf what do you think?
Thanks!
With PrestaShop 1.7.4.2 & 1.7.5.0 , if you have an attribute with a color and you try to change it for a texture, it keeps the color and the uploaded texture isn't applied.
https://drive.google.com/file/d/1I4mURGwGtLKPScUxvpo8q-3juKusv1qK/view?usp=sharing
When you upload a texture, if there is a color, it should be remove
No, color should not be removed, imagine that you want to upload .png file with a background of choice from the color field, this is how it was working in 1.6 and below, in my opinion behavior of this feature should not be changed.
Texture should have higher priortiy on front-office, that's it, but do not delete color value.
@kpodemski
imagine that you want to upload .png file with a background of choice from the color field
I just tried with an 1.6, if I upload a png file the background don't take the color of the field.
https://drive.google.com/open?id=1qXGo0JA-vZ7dJug8H-v1f-FBKEKwlFe5
The color is displayed or the texture but not both
@marionf yes, that's correct, but values in back-office are available, so:
@marionf @khouloudbelguith @dennispw
Most helpful comment
@marionf @khouloudbelguith @dennispw
12523