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 issue with deleting a category with subcategories on Multistore #11679

Merged
merged 1 commit into from Dec 14, 2018

Conversation

Projects
None yet
5 participants
@MathiasReker
Copy link
Contributor

MathiasReker commented Dec 9, 2018

Questions Answers
Branch? develop
Description? When deleting a category, it checks if there are multishop entries first before deleting images etc. However, when deleting a category with subcategories, the images and other associations of the subcategories will not get deleted because the top category gets deleted last, and the code checks multishop entries with $this instead of the variable of the category $cat that just got deleted. This bugfix solves that.
Type? bug fix
Category? CO
BC breaks? no
Deprecations? no
Fixed ticket? #11437
How to test? In the admin: Enable multishop and create an extra shop so you have at least two. Then put your context on "all shops". Then create a category under "Home". Then add a subcategory under the new category with an image. Then go to "Home" and delete the top category you just created. You will see the image of the subcategory is not deleted without this fix.

This change is Reviewable

Fix

@MathiasReker MathiasReker changed the title Fix Fix issue with deleting a category with subcategories on Multistore Dec 9, 2018

@marionf marionf self-assigned this Dec 10, 2018

@marionf marionf added QA ✔️ and removed waiting for QA labels Dec 12, 2018

@marionf marionf removed their assignment Dec 12, 2018

@Quetzacoalt91 Quetzacoalt91 merged commit e52cb35 into PrestaShop:develop Dec 14, 2018

2 checks passed

Codacy/PR Quality Review Up to standards. A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Quetzacoalt91

This comment has been minimized.

Copy link
Member

Quetzacoalt91 commented Dec 14, 2018

Thank you @MathiasReker

@Quetzacoalt91 Quetzacoalt91 added this to the 1.7.6.0 milestone Dec 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment