Ordering always creates multiple items in row 0

More
10 years 6 months ago #51571 by chenz2
Hello there,
Whenever I create a new item in a category, it always assigns it to order number 0. That's fine. But the problem it doesn't move the existing item there that is 0 to the number 1 spot. Both items (old and new) stay at 0, which causes my new item to never be at top of list. This seems to be a bug?

screencast.com/t/wKDSreBtWE
I added 'This should be 12' and you can see, it is 2nd in the order and both items have order number of 0 now. It doesn't make sense. If I press the 'save order' button at this point, 'this should be 12' stays in the second position. I'm really confused.

Thank you kindly.

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

More
10 years 6 months ago #51596 by ggppdk
Hello

it was always like this, it is old Joomla behaviour,

but i don't say that this is best,
-- by default creating an item does not change the ordering attribute of other items


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
10 years 6 months ago #51598 by chenz2
Okay, thank you for letting me know. I never had a problem when using joomla content though. It always worked in that my newest item always showed at top of order list.

Is it an easy fix in flexicontent to move all items out of the 0 order if there is a new one item? So they don't share the same order number? Or would I most likely need to hire someone to do this for me?

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

More
10 years 6 months ago #51603 by ggppdk
Hello

i think the difference must not be in re-ordering

i think that Joomla does this ,

-- if 2 items have same ordering attribute, then the date is considered

but FLEXIcontent does not need to hard code this !, it has 2nd level ordering to be selectable,

have you tried to order but
1. by ordering attibute
2. then by creation date

??


the above if for frontend,
-- if you mean backend, i think it makes sense to make minor change to the 2nd level order in the SQL query ?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
10 years 6 months ago #51608 by chenz2
Yes that works for frontend list but then it is disjointed from the actual list of items ordered in the backend: screencast.com/t/Ub22aqlH It is this item area where, when I create a new item, should show up in ordering in the first slot. Ideas?

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

More
10 years 6 months ago #51609 by ggppdk
Hello

inside
components/com_flexicontent/models/items.php

we have:


} else if ($filter_order == 'i.ordering') {
$orderby = ' ORDER BY i.catid, ' .$extra_order. $filter_order .' '. $filter_order_Dir .", i.id ASC";
} else if ($filter_order == 'catsordering') {
$orderby = ' ORDER BY rel.catid, ' .$extra_order. $filter_order.' '.$filter_order_Dir .", i.id ASC";


as you see the 2-nd level order is ID incrementing ... it should be decrementing

so probably it should be (-2- places):
i.id DESC
instead of
i.id ASC


please test and i will commit the change


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.358 seconds
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save