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

Fix: non-svg custom icon is hidden in FO after editing in BO #430

Merged
1 commit merged into from
Aug 12, 2022

Conversation

leemyongpakvn
Copy link
Contributor

@leemyongpakvn leemyongpakvn commented Jul 22, 2022

Problem:
In first Upload and Save, the custom icon is stored in custom_icon column AdminBlockListingController.php#L167-L204
In later Edit and Save, the custom icon moved to icon column AdminBlockListingController.php#L146-L163
So following displayBlockProduct.tpl#L24-L30, a non-svg custom icon is showed after first Save, then is hidden after later Save.

Questions Answers
Description? Solution:
Predefined svg icon and Custom uploaded icon must be saved in icon and custom_icon column respectively, based on icon source.
Type? bug fix
BC breaks? no
Deprecations? no
Fixed ticket? Fixes PrestaShop/PrestaShop/issues/29134
How to test? Please follow the related issue's Steps to reproduce before PR and after PR

Predefined svg icon and Custom uploaded icon must be saved in icon and custom_icon column respectively, based on icon source.
Copy link

@NeOMakinG NeOMakinG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍬

@NeOMakinG NeOMakinG added the waiting for QA Status: Waiting for QA feedback label Jul 25, 2022
@NeOMakinG
Copy link

@leemyongpakvn on 🔥 these days

@matks
Copy link
Contributor

matks commented Jul 25, 2022

@leemyongpakvn I agree with @NeOMakinG : you're doing a wonderful job

@florine2623 florine2623 self-assigned this Jul 25, 2022
@leemyongpakvn
Copy link
Contributor Author

@NeOMakinG We need some rain these days 💦

Copy link
Contributor

@florine2623 florine2623 left a 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.
Screenshot 2022-08-04 at 15 55 23

Here's what I have in my database :
Screenshot 2022-08-04 at 15 55 59

In my BO, the previously added image is not displayed, here's what I have:
Screenshot 2022-08-04 at 15 57 06
If I deactivated my block, there's no more error.

@florine2623 florine2623 added the waiting for author Status: Waiting for Author Feedback label Aug 4, 2022
@leemyongpakvn
Copy link
Contributor Author

leemyongpakvn commented Aug 4, 2022

when I add non-svg icon, I install the PR, and then I check my FO

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.
So please try to edit an exiting block or add a new block after apply PR, then check the FO.
And make sure that you use a fresh install of blockreassurance 5.1.1 to test, I'm afraid that you have applied many PRs during your QA work.

@leemyongpakvn
Copy link
Contributor Author

leemyongpakvn commented Aug 4, 2022

@florine2623 FYI the error you described above is similar to a 3 months-old issue PrestaShop/PrestaShop/issues/28264

Copy link
Contributor

@florine2623 florine2623 left a 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!

@florine2623 florine2623 added QA ✔️ Status: QA-Approved and removed waiting for author Status: Waiting for Author Feedback waiting for QA Status: Waiting for QA feedback labels Aug 12, 2022
@ghost ghost merged commit 0588524 into PrestaShop:dev Aug 12, 2022
@ghost
Copy link

ghost commented Aug 12, 2022

Thank you @leemyongpakvn && @florine2623

@ghost ghost added this to the 5.1.2 milestone Aug 12, 2022
@leemyongpakvn leemyongpakvn deleted the patch-2 branch August 13, 2022 00:10
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QA ✔️ Status: QA-Approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

blockreassurance module: non-svg custom icon is hidden in FO after editing in BO
5 participants