-
Notifications
You must be signed in to change notification settings - Fork 49
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
Fix: non-svg custom icon is hidden in FO after editing in BO #430
Conversation
Predefined svg icon and Custom uploaded icon must be saved in icon and custom_icon column respectively, based on icon source.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍬
@leemyongpakvn on 🔥 these days |
@leemyongpakvn I agree with @NeOMakinG : you're doing a wonderful job |
@NeOMakinG We need some rain these days 💦 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @leemyongpakvn ,
Tested on 1.7.8.x and 8.0.x.
Tested with svg and non-svg icons. Icons are always available.
I am encountering an error when I add non-svg icon, I install the PR, and then I check my FO.
Here's what I have in my database :
In my BO, the previously added image is not displayed, here's what I have:
If I deactivated my block, there's no more error.
In theory: my PR only impact the FO once you Edit and Save a block in BO. Just apply the PR won't break anything. |
@florine2623 FYI the error you described above is similar to a 3 months-old issue PrestaShop/PrestaShop/issues/28264 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @leemyongpakvn ,
Tested again with fresh install 1.7.8.7 and 8.0.x + installation of your PR on v5.1.1.
Tested non-svg and svg icons and checked in BO and FO if the display was correct.
Edited the icon multiple time via Modify icon
or via or upload file
and tested with svg, jpg, png and gif.
Checked multilanguage if the icons were uploaded.
It is looking good! Icons are always kept in FO if not edited.
It is QA ✅
Thans!
Thank you @leemyongpakvn && @florine2623 |
Problem:
In first Upload and Save, the custom icon is stored in
custom_icon
column AdminBlockListingController.php#L167-L204In later Edit and Save, the custom icon moved to
icon
column AdminBlockListingController.php#L146-L163So following displayBlockProduct.tpl#L24-L30, a non-svg custom icon is showed after first Save, then is hidden after later Save.
Predefined svg icon and Custom uploaded icon must be saved in
icon
andcustom_icon
column respectively, based on icon source.