Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: [SOLVED] Category sorting issue

[SOLVED] Category sorting issue 11 years 1 month ago #21881

  • Chris@XtremeSpeed
  • Chris@XtremeSpeed's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 12
  • Thank you received: 0
I wanted to add something that we recently discovered (Joomla 2.5, DTR 2.8.8f)

We were having a lot of trouble sorting categories. Not at first, but after a while. We added several categories, then deleted some, created new ones, and that's where our trouble began. We could not get the categories into the desired order. That is, some categories sorted, others, no way.

The issue for us was traced it to the way DT Register handles sorting of categories. I fixed the issue directly in the database. The table _dtregister_categories uses the fields "lft" and "rgt" to handle category sorting. The ROOT category has values of 0 and 1, respectively. When you add new categories, those values are incremented 2 and 3, 4 and 5, etc. (Parent categories contain values that include the range, for instance a parent with two children might have the values 10 and 15 for the parent, with 11 and 12, 13 and 14 for its two children.)

Now a problem seems to surface if you have a lot of categories and then delete the ones sorted to the top of the list. Let's say you delete the categories with values 2 and 3, and 3 and 4. Now when you create new categories, those will not get the values at the end of your list (say, if you are up to 16 and 17, the next ones will not get the values 18 and 19 for "lft" and "rgt"). The new categories will jump to the beginning and get the values from the previously deleted categories. What makes it even more confusing is that the new categories for some reason will not sort beyond the older categories. You can sort the new ones among each other, but not beyond the older categories if you have a gap in the "lft" and "rgt" sequence.

We were able to fix this by re-assigning the values directly in the database to reset the sequence for the "ltr" and "rgt" values, and set the desired sort order. Not sure if this was just a quirk with our copy and installation of DT Register. In any case, I hope this info is relevant.
Attachments:

  • Rendering Error in layout Attachment/Item: Property "protected" is not defined. Please enable debug mode for more information.

Please Log in or Create an account to join the conversation.

[SOLVED] Category sorting issue 11 years 3 weeks ago #21913

  • nathan.dth
  • nathan.dth's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 1857
  • Karma: 19
  • Thank you received: 218
With the new 2.8.9 release, the category ordering is fixed. The previous build fixed it partially, but now it's all set. Download it from My Orders.

Please Log in or Create an account to join the conversation.

Nathan is no longer affiliated with DTH since the recent acquisition. You can connect with him and get any type of Joomla website help at www.JoomlaEmployee.com .

[SOLVED] Category sorting issue 10 years 11 months ago #22086

  • Chris@XtremeSpeed
  • Chris@XtremeSpeed's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 12
  • Thank you received: 0
Still not working correctly for us. Yes, the categories now sort in the admin, but it seems to have no affect on how the events are ordered in the front-end display. We can put events in categories and sort the categories all we want, but the front-end display does not seem to honor the order. Please see details on open support ticket.

Frank

Please Log in or Create an account to join the conversation.

[SOLVED] Category sorting issue 10 years 11 months ago #22088

  • Chris@XtremeSpeed
  • Chris@XtremeSpeed's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 12
  • Thank you received: 0
With each upgrade of DT Register, it is usually necessary to reset configuration settings. We found that the problem was not with the sorting, but with the fact that our upgrade reset a configuration setting to an ordering that we did not want in: Components > DT Register > Configuration > Event Listing > Miscellaneous > Event List Ordering. Default is apparently "Next Upcoming First". We changed it to "Category" and was able to order our events in the desired sorting order.

Not sure if this sorting option is new with DT Register 2.8.9b, but I don't recall ever having to check or change that with previous upgrades. Moral of the story, I guess, is upgrade only when you have time to thoroughly go over your settings. It would be nice if the settings could be saved in an INI file, or something like that, and then re-applied after each upgrade.

Please Log in or Create an account to join the conversation.

[SOLVED] Category sorting issue 10 years 11 months ago #22095

  • nathan.dth
  • nathan.dth's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 1857
  • Karma: 19
  • Thank you received: 218
Chris - sorry, but the moral of the story is the read our announcements about new updates. :) Let me note a few things:

1) You NEVER have to reset the DT Register configuration... and it never resets on its own when you update.

2) Most updates do not include configuration changes, but when they do, we always make note of it in the announcements (on site and email) and sometimes also in the package readme file (depending on what it is).

3) This particular item was noted in the website announcement, email and a few other forum posts already. From the announcement:

- Added new event ordering options. No longer are you forced to list events first by category! Ordering now is applied as a primary ordering, with "Category" as an OPTION. If you choose Category, then a new Secondary Ordering parameter is applied to order within the category (for those that wish to keep it how it has always been).
- Added option to list event category in the list view as an event detail, not in a separate column. Now you can have it listed just like Location and Moderator are listed. The old Category headers only show when you choose to order events by category.


Sorry that you had some struggle with this after the 2.8.9 update, but know that not only were the category issues resolved (actually the sorting issue was resolved in 2.8. 8) , but we improved on it... giving you new options and more control! :)

So, read our announcements as it will not only prevent any surprises, but will make sure you are always aware of cool new things that you may overlook otherwise!

Please Log in or Create an account to join the conversation.

Nathan is no longer affiliated with DTH since the recent acquisition. You can connect with him and get any type of Joomla website help at www.JoomlaEmployee.com .

[SOLVED] Category sorting issue 10 years 11 months ago #22099

  • Chris@XtremeSpeed
  • Chris@XtremeSpeed's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 12
  • Thank you received: 0
Thank you, Nathan. Admittedly, we've had our ups and downs with DT Register, but in the end, we continue using it on a couple of sites for its pluses over minuses. :)

Thanks!
Frank (on behalf of Chris)

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.189 seconds