? Success

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
4 Mar 2015

Right now, the method JTableNested::rebuild() can not be called from a JTableAsset object, because JTableNested::rebuild() expects the table to have a column named 'alias'. This prevents that table from being repaired. This PR implements a specific method for this table that does not need the alias column.

Not being able to repair this table is a big issue, since the permissions system might be borked with this. The specific example is a large JoomGallery installation with ~20k images. Each of these images has an entry in the assets table. Somehow the categories got messed up and several thousand images were not assigned to a correct parent item in the assets table. This meant that no normal user was able to edit his own images. With some SQL queries I was able to fix the images to their right category, but that still meant that the lft and rgt values were wrong and thus the queries would still result in wrong results. Calling JTableAsset::rebuild() would normally fix that, but a) there is no way to do that from the GUI and b) the method from JTableNested failed.

Test instructions

Put JTable::getInstance('Asset')->rebuild(); somewhere in for example a layout of yours and open the page with that layout. See that it fails fatally. Apply the patch. See that it works now. Also see that the assets table has been rebuild.

Maybe we should add this to the "fix database" button in the extension manager.

avatar Hackwar Hackwar - open - 4 Mar 2015
avatar joomla-cms-bot joomla-cms-bot - change - 4 Mar 2015
Labels Added: ?
avatar chmst
chmst - comment - 4 Mar 2015

@test - success
Before patch: Unknown column 'alias' in 'field list' SQL=SELECT id, alias FROM cbf3_assets WHERE parent_id = 1 ORDER BY parent_id, lft
After the patch: no error
Data in lft and rgt columns not checked


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6307.
avatar chmst chmst - test_item - 4 Mar 2015 - Tested successfully
avatar zero-24 zero-24 - change - 6 Mar 2015
Category Libraries
avatar anibalsanchez anibalsanchez - test_item - 6 Nov 2015 - Tested successfully
avatar anibalsanchez
anibalsanchez - comment - 6 Nov 2015

I have tested this item :white_check_mark: successfully on e84377f

Test OK


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6307.

avatar zero-24 zero-24 - alter_testresult - 6 Nov 2015 - chmst: Tested successfully
avatar zero-24 zero-24 - change - 6 Nov 2015
Milestone Added:
Status Pending Ready to Commit
avatar zero-24 zero-24 - change - 6 Nov 2015
Milestone Added:
avatar zero-24
zero-24 - comment - 6 Nov 2015

RTC. Thanks. @committer can you update the @since tag to 3.5 on merge? If not i can send a pull for it if needed and this is merged.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6307.

avatar joomla-cms-bot joomla-cms-bot - change - 6 Nov 2015
Labels Added: ?
avatar joomla-cms-bot
joomla-cms-bot - comment - 7 Nov 2015

This PR has received new commits.

CC: @anibalsanchez, @chmst


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6307.

avatar Hackwar
Hackwar - comment - 7 Nov 2015

There you go

avatar zero-24
zero-24 - comment - 7 Nov 2015

Thanks @hackwar

avatar wilsonge wilsonge - change - 8 Nov 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-11-08 18:11:25
Closed_By wilsonge
avatar wilsonge wilsonge - close - 8 Nov 2015
avatar joomla-cms-bot joomla-cms-bot - close - 8 Nov 2015
avatar wilsonge wilsonge - reference | 2221477 - 8 Nov 15
avatar wilsonge wilsonge - merge - 8 Nov 2015
avatar wilsonge wilsonge - close - 8 Nov 2015
avatar joomla-cms-bot joomla-cms-bot - change - 8 Nov 2015
Labels Removed: ?
avatar wilsonge
wilsonge - comment - 8 Nov 2015

Merged - thanks @Hackwar

Add a Comment

Login with GitHub to post a comment