Drag&drop image ordering doesn't work correctly in backend [WORKAROUND]

Phoca Gallery - image gallery extension
darkholokaust
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 16 Aug 2017, 18:17

Drag&drop image ordering doesn't work correctly in backend [WORKAROUND]

Post by darkholokaust »

Hello!
i've a problem with image ordering in a production site; so i created a fresh instalation of joomla (3.7.4), then i installed phoca gallery (4.3.6) and i created some categories as:
base category
- first gallery
- second gallery

Then i populated the 2 galleries with some images and then i set up "image ordering" as "ordering desc".
Now, if i go to images lists on backend (filtering for example the firt gallery), i click on ordering column to "desc" and i make some change with drag&drop ordering feature: the result is a mess. The programm losts the original order and if i refresh the frontend gallery view, the order seems to be random. If i click on ordering column in backend, the order follow the "random" one in frontend.

Is this a bug?
Thanks for reply

Fabrizio
Last edited by darkholokaust on 17 Aug 2017, 16:40, edited 1 time in total.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Image ordering problem

Post by Jan »

Hi, in which view you get the problems - in categories view or category view? Can I see the site where this occurs?

Jan
If you find Phoca extensions useful, please support the project
darkholokaust
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 16 Aug 2017, 18:17

Re: Image ordering problem

Post by darkholokaust »

Hi! I think i found the problem. Just work on backend, in images section. If you order the images by "order acending", all work as espected; if you order by "order descending" and try to use the drag'n'drop feature, the order will mess up!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Image ordering problem

Post by Jan »

Hi, yes, in administration, you should order them by order ascending, then you can reorder the items and then it takes effect in frontend. It behaves the same way like e.g. Joomla! article ordering, etc.

Jan
If you find Phoca extensions useful, please support the project
darkholokaust
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 16 Aug 2017, 18:17

Re: Image ordering problem

Post by darkholokaust »

Ok, i can confirm that is a phocagallery bug!
In backend, if you order the images by "order descending" the drag&drop feature doesn't work correctly!

A workaround for this is to use always "order ascending"
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Drag&drop image ordering doesn't work correctly in backend [WORKAROUND]

Post by Jan »

Hi,
Ok, i can confirm that is a phocagallery bug!
Can you locate the bug in the code so I can take a look at it.

I am testing it now on 3 different server, without any problem to order the items :idea:

Jan
If you find Phoca extensions useful, please support the project
darkholokaust
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 16 Aug 2017, 18:17

Re: Drag&drop image ordering doesn't work correctly in backend [WORKAROUND]

Post by darkholokaust »

no ican't at the moment..
select order "descending" on images list (if you don't the ordering works proper); try reorder 1 or 2 times with drag&drop; then refresh frontend.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Drag&drop image ordering doesn't work correctly in backend [WORKAROUND]

Post by Jan »

Hi, yes, testing reordering and when in frontend is "ordered by ordering" then the ordering is taking into account - this is in fact Joomla! feature and it works the same way for all components :idea:
If you find Phoca extensions useful, please support the project
darkholokaust
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 16 Aug 2017, 18:17

Re: Drag&drop image ordering doesn't work correctly in backend [WORKAROUND]

Post by darkholokaust »

the order , as i wrote, must be set in backend, here
administrator/index.php?option=com_phocagallery&view=phocagalleryimgs
filter as "ordering descending" and try reorder
the frontend order is not important, it will be messed up
tested on both windows and linux server, on both php7 and 5.6
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Drag&drop image ordering doesn't work correctly in backend [WORKAROUND]

Post by Jan »

Hi, maybe I understand now:

- when the ordering is set to ascending in administration, and you reorder then the reordering is OK
- when the ordering is set to descending and you reorder then it gets wrong positions?

Is this what you mean?

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