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 the categories tree #7940

Merged
merged 1 commit into from Jun 22, 2017

Conversation

Projects
None yet
4 participants
@hibatallahAouadni
Contributor

hibatallahAouadni commented May 30, 2017

Questions Answers
Branch? 1.6.1.x
Description? the problem is that category will be deleted when you try to add main cat to sub-category.
Type? bug fix
Category? BO
BC breaks? no
Deprecations? no
Fixed ticket? http://forge.prestashop.com/browse/PSCSX-9097
How to test? try to edit a category, you will find all its sub-categories are disabled, so you can't add to one of its sub-cat.

@marionf marionf added this to the 1.6.1.15 milestone May 31, 2017

@marionf marionf added the QA ✔️ label May 31, 2017

@marionf

This comment has been minimized.

Show comment
Hide comment
@marionf

marionf May 31, 2017

Contributor

This PR is solving a problem with the category tree on product page due to the PR #7925
Thanks @hibatallahAouadni for solving it.

Contributor

marionf commented May 31, 2017

This PR is solving a problem with the category tree on product page due to the PR #7925
Thanks @hibatallahAouadni for solving it.

foreach ($subtree as $subcategoryId => $subcategory) {
$tree[$categoryId]['children'][$subcategoryId] = $subcategory;
}
}

This comment has been minimized.

@hibatallahAouadni

hibatallahAouadni Jun 22, 2017

Contributor

@maximebiloe from 65 to 97 all these are the changement made by thierry (in the branch 1.7.0.x and not 1.6.1.x)

@hibatallahAouadni

hibatallahAouadni Jun 22, 2017

Contributor

@maximebiloe from 65 to 97 all these are the changement made by thierry (in the branch 1.7.0.x and not 1.6.1.x)

@maximebiloe maximebiloe merged commit ca5040d into PrestaShop:1.6.1.x Jun 22, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@maximebiloe

This comment has been minimized.

Show comment
Hide comment
@maximebiloe
Contributor

maximebiloe commented Jun 22, 2017

Thank you @hibatallahAouadni

@Artxlv

This comment has been minimized.

Show comment
Hide comment
@Artxlv

Artxlv Sep 22, 2017

This fix causes very slow loading Associations Tab, when you want to edit product. I upgraded from 1.6.1.11 to 1.6.1.17 and could not get a category tree on product editing page anymore - I always got the timeout error. So I traced until the HelperTreeCategories.php fillTree method and found this bad fix. With old fillTree method categories loaded more than 10 times faster. (I have ~35000 categories)

Artxlv commented Sep 22, 2017

This fix causes very slow loading Associations Tab, when you want to edit product. I upgraded from 1.6.1.11 to 1.6.1.17 and could not get a category tree on product editing page anymore - I always got the timeout error. So I traced until the HelperTreeCategories.php fillTree method and found this bad fix. With old fillTree method categories loaded more than 10 times faster. (I have ~35000 categories)

@hibatallahAouadni

This comment has been minimized.

Show comment
Hide comment
@hibatallahAouadni

hibatallahAouadni Sep 22, 2017

Contributor

the PHP part is Thierry PR: #6318 and I just "cherry-picked"

Contributor

hibatallahAouadni commented Sep 22, 2017

the PHP part is Thierry PR: #6318 and I just "cherry-picked"

@Artxlv

This comment has been minimized.

Show comment
Hide comment
@Artxlv

Artxlv Sep 22, 2017

Sorry, forwarded.

Artxlv commented Sep 22, 2017

Sorry, forwarded.

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