Keyword

Featured Ordering not work

More
8 years 8 months ago #147505 by Lefteris
Replied by Lefteris on topic Featured Ordering not work
@MGS Creativa

You wrote before about items ID 17 and 777 and you provided two screenshots. You wrote that the column is missing. I don't see anything weird in the screenshots you provided regarding this.

Probably the values are messed up in your database. I suggest to revert the changes you made and then just go to K2 parameters and set the option "Disable ordering compacting" to "No" . Then try to reorder again and K2 should fix the values for all featured items.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
8 years 8 months ago - 8 years 8 months ago #147509 by MGS Creativa
Replied by MGS Creativa on topic Featured Ordering not work
Hi @Lefteris, thanks for taking the time to answer.

As I said in this post

MGS Creativa wrote: Sorry Krikor, no luck.

After installing dev build, tried to set items ID 17 and 777 respectively imgur.com/x8lT6Wh, but after reload reorder still gets missing imgur.com/b7HOIHs


The issue is that ordering gets missing, no columns...

Disable ordering compacting is set to no but that doesn't solves anything, even setting it to yes, because the issue is that savefeaturedorder() member function in items model doesn't takes into account featured ordering. With my workaround, it takes into account if the listing sent to reorder is composed only by featured items and no other filters got applied, that's the most similar case as joomla! featured content view , in that case, the items gets reordered as seen in the listing and affecting only the featured_order column.

I see two options here, K2 must have a dedicated view for featured items that can be reordered taking into account featured_order column, or as in my case, take into account if the user filtered featured items only, and no other filter (that resembles the featured items only view) and, if that's the case, reorder items using the featured_order column.

Please advise if I'm not completely clear about this.

Best regards!

PS: If any dev want to contact me through skype, feel free to ask my skype contact to have a chat about this
Last edit: 8 years 8 months ago by MGS Creativa.

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

More
8 years 8 months ago - 8 years 8 months ago #147540 by Dion Eng
Replied by Dion Eng on topic Featured Ordering not work
I've just tried this code and for the most part it works! but it seems that as soon as I add a new featured item and drag it to the top it messes up the entire order.

Any clues?
Last edit: 8 years 8 months ago by Dion Eng.

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

More
8 years 7 months ago - 8 years 7 months ago #147579 by MGS Creativa
Replied by MGS Creativa on topic Featured Ordering not work
Hi @Dion Eng, when you add a new item and click Save and Close, K2 removes all filters, even the order filter, so after you add a new featured item you have to click the order column and filter items by featured only, that way, you enshure my workaround gets executed.

As I said before, this is a simple workaround until K2 devs get the real fix. It gets applied only if you are listing featured items, and no other item filter is set, if not, then the buggy reordering gets applied and messes up everything.

Regards!
Last edit: 8 years 7 months ago by MGS Creativa.

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

More
6 years 4 months ago #166166 by wardog
Replied by wardog on topic Featured Ordering not work
I have found out a walkthrough on this (although it definetely needs to be fixed on newer versions by K2 team). I think it has something to do with the updated shorting system in Joomla (drag n drop). If you had an earlier version (order with arrows or values) and updated to a newer version with drag n drop shorting that probelm appears! We need an update so the user can "reset" his ordering with an increment logic starting from 1 or something like that.

In my case (Joomla v3.8.3 - K2 v2.8) the ordering column in K2_items table had an array of values like 0,1,1,1,2,2,2,3,4,5,5,5,5,5,5,etc instead of an increment logic such us 1,2,3,4,5,6,8,9,etc. So every time I re-order my items in a category from Joomla these values are changing but with the same logic (1,1,1,3,3,3,2,2,2,2, etc). As a result probably it is ordering all the 1,1,1,1,1 by name or something since it cannot add increment values.

But, If you find a way to set these values appropriatelly (0,1,2,3,4) then Joomla ordering wortks like a charm!

So in my case, I have found a solution by writing a mySQL query that resets the values in 'ordering' column in a specific category by adding unique values on them. So I have added the ID value which is uniqe to the 'ORDERING' field. This way Joomla understands how to handle the ordering values since they are unique for this category. After that I was able to order k2 items in Joomla with 0 issues...

The mySQL suery I created is this:
UPDATE `jos_k2_items` SET `ordering`=`id` WHERE `catid`="YOUR_CATEGORY_ID";

Just replace YOUR_CATEGORY_ID with your k2 category ID number that you like the query to be executed.

I hope I have helped... :)

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 4 months ago #166242 by Krikor Boghossian
Replied by Krikor Boghossian on topic Featured Ordering not work
Hello there and sorry for the late reply,

featured_ordering is actually the field which holds the value for featured ordering.
The ordering is applied on a category basis only.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum