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: Problem with the blockreassurance module in case of a site in a subfolder #712

Conversation

Codencode
Copy link
Contributor

@Codencode Codencode commented Sep 18, 2024

Questions Answers
Description? If images are uploaded while the site is in a subfolder and then the folder name is changed, or the site is moved to the root directory, the uploaded images will no longer be visible.
Type? bug fix
BC breaks? no
Deprecations? no
Fixed ticket? Fixes #36956
Sponsor company @Codencode
How to test?

@ps-jarvis
Copy link

Hello @Codencode!

This is your first pull request on blockreassurance repository of the PrestaShop project.

Thank you, and welcome to this Open Source community!

@Codencode Codencode requested a review from nicosomb February 17, 2025 08:34
@ps-jarvis ps-jarvis added the waiting for QA Status: Waiting for QA feedback label Feb 17, 2025
@florine2623 florine2623 self-assigned this Mar 4, 2025
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 @Codencode ,

I followed the same steps as I did in the issue PrestaShop/PrestaShop#36956 (comment), but I still encounter the issue.
I don't have any images displayed in BO after changing the name of my shop folder.
I changed from ps821 to ps821hello .

Here's what I have in my FO :
Screenshot 2025-03-05 at 10 47 52

In my BO :
Screenshot 2025-03-05 at 10 46 35

And in my database :
Screenshot 2025-03-05 at 10 46 59

Am I doing something wrong ?
Waiting for your feedback :)

@florine2623 florine2623 added the waiting for author Status: Waiting for Author Feedback label Mar 5, 2025
@Codencode
Copy link
Contributor Author

Hi @florine2623,

I think I understand your issue, so let me explain how the PR works.
When you upload a new image, the system saves the "relative" path in the database. My PR changes the way the system saves the image path in the database, but it is not retroactive, so it won't modify paths that are already in the database.
Therefore, you should try it this way:

  • Install my PR
  • Reset the module
  • Upload the images
  • Change the PrestaShop installation folder
  • Perform your checks.

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 @Codencode , I hope you are doing good ^^

Indeed, after following your steps, it works as you said.

I tested in PS 8.2.1 and 9.0.0 with and without a subfolder at installation.

It looks as expected.

Here's what I have in the database :
Screenshot 2025-03-07 at 10 50 15

Here's what I have in FO, BO after changing my shop folder name :

Screen.Recording.2025-03-07.at.10.56.36.mov

Thanks for the explanation, it was helpful !
It is QA ✅

@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 Mar 7, 2025
@nicosomb nicosomb added this to the 6.0.0 milestone Mar 7, 2025
@nicosomb nicosomb merged commit 633f5fd into PrestaShop:dev Mar 7, 2025
@Codencode
Copy link
Contributor Author

Thanks for the explanation, it was helpful !
It is QA ✅

Perfect, I'm glad the explanation was helpful!

Thank you!

@Codencode Codencode deleted the fix-36956-problem-blockreassurance-in-a-subfolder branch March 7, 2025 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QA ✔️ Status: QA-Approved
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

4 participants