Storing category sort order fails when pagination is smaller

Phoca Gallery - image gallery extension
Padyx
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 15 Aug 2008, 23:14

Storing category sort order fails when pagination is smaller

Post by Padyx »

Hi there

I encountered (and debugged) an issue that I have on our club homepage with Phoca Gallery 3.2.8 (Joomla 2.5.28).

The issue is as follows: When entering manual ordering values in the column "ordering" of categories, clicking the save button sometimes brings up this message: "You cannot change the order of items, as an item in the list is 'Checked Out'".
However, no category is checked out (I checked the columns 'checked_out' and 'checked_out_time' in the phocagallery_categories table of my database.

With some debugging I found that: It only fails when the pagination is smaller than the number of categories (me: pagination 50, categories: 60).
The reason seems to be that the javascript called on clicking the disk icon (.../media/system/js/core.js) is being called with a value that might be wrong:
(Taken from: ... /administrator/index.php?option=com_phocagallery&view=phocagallerycs )

Code: Select all

<a href="#" onclick="Joomla.tableOrdering('a.ordering','desc','');return false;" title="Click to sort by this column">Ordering<img src="/media/system/images/sort_asc.png" alt=""></a><a href="javascript:saveorder(59, 'phocagallerycs.saveorder')" class="saveorder" title="Save Order"></a>
I stopped my debugging here, because when I switched the pagination to "All", the function works - and I have no clue of the internals of Joomla / PhocaGallery work to efficiently debug and fix it.

Is this a bug only with me (aka "reinstall please") or is it a real bug.
I'd be happy to help / supply more info if needed :)

Cheers - and thanks for this awesome component!
Patrick
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Storing category sort order fails when pagination is sma

Post by Jan »

Hi, thank you for the info, for now I don't know about this behavior, I will take a look at it.

Thank you, Jan
If you find Phoca extensions useful, please support the project
Post Reply