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 category batch copy #2632

Merged
merged 2 commits into from
Dec 4, 2013
Merged

Conversation

Bakual
Copy link
Contributor

@Bakual Bakual commented Dec 2, 2013

Issue

Try batch copy a category if

  • the category itself has subcategories
  • you also change the language or access level with the same batch process

This will fail with a fatal error in case of batchAccess or a lengthy error message in case of batchLanguage. The categories will be copied (sometimes even multiple times), but the access levels and languages are not correctly changed.

Bugtracking

The problem is that the table->reset() function didn't reset the _location and _location_id properties of the table. Thus subsequent stores tried to move the categories again, which failed due to wrong parent ids.

Fix

This PR adds JTableNested->reset() which will reset the locations (using $this->setLocation(0)) after the parent reset function was executed.

Fixes #2628
Tracker: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=32827

infograf768 added a commit that referenced this pull request Dec 4, 2013
@infograf768 infograf768 merged commit cc1eb30 into joomla:master Dec 4, 2013
@Bakual Bakual deleted the FixCategoryBatchCopy branch December 4, 2013 15:36
@Bakual Bakual restored the FixCategoryBatchCopy branch December 4, 2013 16:58
@Bakual Bakual deleted the FixCategoryBatchCopy branch December 4, 2013 16:58
@Bakual Bakual restored the FixCategoryBatchCopy branch December 4, 2013 16:59
@Bakual Bakual deleted the FixCategoryBatchCopy branch December 4, 2013 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants