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

SVG usage in blockreassurance is broken #25458

Open
matks opened this issue Jul 29, 2021 · 8 comments
Open

SVG usage in blockreassurance is broken #25458

matks opened this issue Jul 29, 2021 · 8 comments
Labels
1.7.7.4 Affects versions Blockreassurance Module: blockreassurance Bug Type: Bug FO Category: Front Office Image Label: Which BO under menu is concerned Major Severity: major bug > https://build.prestashop.com/news/severity-classification Module Module Ready Status: Issue is ready to be worked on Verified The issue has been reproduced

Comments

@matks
Copy link
Contributor

matks commented Jul 29, 2021

Describe the bug

Blockreassurance blocks crash on FO when using an SVG icon and __PS_BASE_URI__ is a slash

Expected behavior

No crash, correct behavior and display of blockreassurrance blocks on FO

Steps to Reproduce

Steps to reproduce the behavior:

  1. You use blockreassurance v5.0.0 and __PS_BASE_URI__ is a single slash / (default situation)
  2. Click on 'configure' for blockreassurance module, edit one block
  3. Upload a custom icon: use a SVG file
  4. Open FO product page, see error Warning: finfo_file(...): failed to open stream: No such file or directory

Screenshots

Capture d’écran 2021-07-29 à 09 32 54

As mentioned by @matthieumota in PR PrestaShop/blockreassurance#210 when __PS_BASE_URI__ is a / the str_replace() replace all slashes by project directory. This is the source of the bug.

Additional information

  • PrestaShop version: 1.7.8.x
  • PHP version: 7.4
@matks
Copy link
Contributor Author

matks commented Jul 29, 2021

PR available PrestaShop/blockreassurance#210

@hibatallahAouadni
Copy link
Contributor

hibatallahAouadni commented Jul 29, 2021

Hello @matks

This issue reminds me of this one #15939 whose already fixed by this PR PrestaShop/blockreassurance#35
Is it related?

Thanks!

@hibatallahAouadni hibatallahAouadni added 1.7.8.x Branch Blockreassurance Module: blockreassurance Bug Type: Bug FO Category: Front Office NMI Status: issue needs more information Image Label: Which BO under menu is concerned labels Jul 29, 2021
@matks
Copy link
Contributor Author

matks commented Jul 29, 2021

No, it is different. PR PrestaShop/blockreassurance#35 enabled the use of SVG but contained a little mistake. This mistake introduced a bug, this is the bug being reported here. PR PrestaShop/blockreassurance#210 fixes this bug, so you could say PrestaShop/blockreassurance#210 is "part 2" of PrestaShop/blockreassurance#35

@hibatallahAouadni
Copy link
Contributor

Well then, thanks for reporting the issue 😉

@hibatallahAouadni hibatallahAouadni added Major Severity: major bug > https://build.prestashop.com/news/severity-classification Ready Status: Issue is ready to be worked on and removed NMI Status: issue needs more information labels Jul 29, 2021
@hibatallahAouadni hibatallahAouadni added this to To do in Native modules integration via automation Jul 29, 2021
@MatShir MatShir added the Module Module label Dec 28, 2021
@hibatallahAouadni hibatallahAouadni added 1.7.7.4 Affects versions Verified The issue has been reproduced and removed 1.7.8.x Branch labels Jan 13, 2022
@olecorre
Copy link
Contributor

olecorre commented Mar 11, 2022

I have the same problem on a new installation, I had to apply the patch

@matks
Copy link
Contributor Author

matks commented Apr 22, 2022

Looks similar to #28264

@hibatallahAouadni
Copy link
Contributor

@matks so should I close it as a duplicate?

@matks
Copy link
Contributor Author

matks commented Apr 25, 2022

@hibatallahAouadni #28264 is being fixed so I suggest we wait for #28264 then we verify if this one is still present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.7.7.4 Affects versions Blockreassurance Module: blockreassurance Bug Type: Bug FO Category: Front Office Image Label: Which BO under menu is concerned Major Severity: major bug > https://build.prestashop.com/news/severity-classification Module Module Ready Status: Issue is ready to be worked on Verified The issue has been reproduced
Projects
Development

Successfully merging a pull request may close this issue.

4 participants