- Posts: 10
COMMUNITY FORUM
Subcategory Ordering
- gianpiero sfameni
-
Topic Author
- Offline
- New Member
I don't know if this is a bug or my mystake, i cannot order items in a subcategory (without child category). Whatever options i chose for ordering items are displayed with the same order.
Everything work fine adding an empty category under the subcategory.
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
Please Log in or Create an account to join the conversation.
- gianpiero sfameni
-
Topic Author
- Offline
- New Member
- Posts: 10
Any other ideas?
Thanks!
Lefteris Kavadas said:Hi. If you choose to show featured items then the ordering defaults to "featured ordering".
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
Gianpiero said:thanks for your reply. no items marked as featured, featured option set to hide and the problem persists. My list show always items ordered by most hits. Any other ideas?
Thanks!
Lefteris Kavadas said:Hi. If you choose to show featured items then the ordering defaults to "featured ordering".
Please Log in or Create an account to join the conversation.
- Justin Gonzalez
-
- Offline
- New Member
- Posts: 3
First off, I also thank you very much for this awesome component! I have run into this same bug - no item sorting control within a sub-category. I tried Lefteris Kavadas suggestion but to no avail have I been able to get this to work.
Now the only thing I haven't tried yet is actually clearing the Joomla! cache, deleting all of my items and then re-adding them. I am going to give that a try in the morning but if anyone has any other suggestions, or knows exactly what the problem is and how to fix it, that would be greatly appreciate!!
Much thanks again and keep up the awesome work!
j.
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
Please Log in or Create an account to join the conversation.
- gianpiero sfameni
-
Topic Author
- Offline
- New Member
- Posts: 10
I'm accessing a single category from a menu pointing to a single category (Options for Ordering Etc.. are disabled!).
This is my actual configuration:
Category:
News
- Events
Menu:
News --> Point to News Category
- Event --> Point to Events Category
Going to Events, from menu or from the subcategory box (displayed in the upper of my page viewing News main category) items are displayed without ordering control.
The only work around i've found is to put an empty subcategory under those containing items.
In my case this work:
Category:
News
- Events
- Dummy Events
Please Log in or Create an account to join the conversation.
- Justin Gonzalez
-
- Offline
- New Member
- Posts: 3
So I checked what you said about the sorting options directly under the menu item linking to this sub-category with the sorting problems. >>>
Projects (K2 » Item / Item)
- Blah (K2 » Item / Item)
- Blah 2 (K2 » Item / Item)
- Blah 3 (K2 » Item / Item)
- Blah 4 (K2 » Item / Item)
- Blah 5 (K2 » Itemlist / Category) ****** PROBLEM SUB-CATEGORY ******
Now, I go into the menu item - Blah 5 (K2 » Itemlist / Category) - and look at the sorting options but they are deactivated (grayed out), so I can't modify them. I do see an option there that I think will fix this issue but it does not allow me to modify it.
Parameters inside this menu option (Blah 5 (K2 » Itemlist / Category)) -
Parameters (Basic) >
Projects
- Web Design (Selected Catagory)
Layout options for multiple category selection
*** ALL OPTIONS ARE GRAYED OUT, CANNOT EDIT ***
One other thing - if I go to my K2 Items, I can re-order them (with green arrows and then save button) but it doesn't actually change the order of the items on the front-end display.
Ideas??
Gianpiero said:Thanks for your suggestions, I followed your instructions but unfortunately the bug is still on! I'm accessing a single category from a menu pointing to a single category (Options for Ordering Etc.. are disabled!).
This is my actual configuration:
Category:
News
- Events
Menu:
News --> Point to News Category
- Event --> Point to Events Category
Going to Events, from menu or from the subcategory box (displayed in the upper of my page viewing News main category) items are displayed without ordering control.
The only work around i've found is to put an empty subcategory under those containing items.
In my case this work:
Category:
News
- Events
- Dummy Events
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
J Gonz said:Hello again,
So I checked what you said about the sorting options directly under the menu item linking to this sub-category with the sorting problems. >>>
Projects (K2 » Item / Item)
- Blah (K2 » Item / Item)
- Blah 2 (K2 » Item / Item)
- Blah 3 (K2 » Item / Item)
- Blah 4 (K2 » Item / Item)
- Blah 5 (K2 » Itemlist / Category) ****** PROBLEM SUB-CATEGORY ******
Now, I go into the menu item - Blah 5 (K2 » Itemlist / Category) - and look at the sorting options but they are deactivated (grayed out), so I can't modify them. I do see an option there that I think will fix this issue but it does not allow me to modify it.
Parameters inside this menu option (Blah 5 (K2 » Itemlist / Category)) -
Parameters (Basic) >
Projects
- Web Design (Selected Catagory)
Layout options for multiple category selection
*** ALL OPTIONS ARE GRAYED OUT, CANNOT EDIT ***
One other thing - if I go to my K2 Items, I can re-order them (with green arrows and then save button) but it doesn't actually change the order of the items on the front-end display.
Ideas??
Gianpiero said:Thanks for your suggestions, I followed your instructions but unfortunately the bug is still on! I'm accessing a single category from a menu pointing to a single category (Options for Ordering Etc.. are disabled!). This is my actual configuration:
Category:
News
- Events
Menu:
News --> Point to News Category
- Event --> Point to Events Category
Going to Events, from menu or from the subcategory box (displayed in the upper of my page viewing News main category) items are displayed without ordering control.
The only work around i've found is to put an empty subcategory under those containing items.
In my case this work:
Category:
News
- Events
- Dummy Events
Please Log in or Create an account to join the conversation.
- Justin Gonzalez
-
- Offline
- New Member
- Posts: 3
I checked out the parameters in the category, which has settings for item ordering, but even after playing with those settings nothing has changed.
Any other ideas?
Lefteris Kavadas said:Hi. The parameters on the menu item page are grayed out because you have select only one category. In this case K2 reads the parameters from the category edit page. If you choose more than one category on the menu item then the parameters are available there.
J Gonz said:Hello again, So I checked what you said about the sorting options directly under the menu item linking to this sub-category with the sorting problems. >>>
Projects (K2 » Item / Item)
- Blah (K2 » Item / Item)
- Blah 2 (K2 » Item / Item)
- Blah 3 (K2 » Item / Item)
- Blah 4 (K2 » Item / Item)
- Blah 5 (K2 » Itemlist / Category) ****** PROBLEM SUB-CATEGORY ******
Now, I go into the menu item - Blah 5 (K2 » Itemlist / Category) - and look at the sorting options but they are deactivated (grayed out), so I can't modify them. I do see an option there that I think will fix this issue but it does not allow me to modify it.
Parameters inside this menu option (Blah 5 (K2 » Itemlist / Category)) -
Parameters (Basic) >
Projects
- Web Design (Selected Catagory)
Layout options for multiple category selection
*** ALL OPTIONS ARE GRAYED OUT, CANNOT EDIT ***
One other thing - if I go to my K2 Items, I can re-order them (with green arrows and then save button) but it doesn't actually change the order of the items on the front-end display.
Ideas??
Gianpiero said:Thanks for your suggestions, I followed your instructions but unfortunately the bug is still on! I'm accessing a single category from a menu pointing to a single category (Options for Ordering Etc.. are disabled!). This is my actual configuration:
Category:
News
- Events
Menu:
News --> Point to News Category
- Event --> Point to Events Category
Going to Events, from menu or from the subcategory box (displayed in the upper of my page viewing News main category) items are displayed without ordering control.
The only work around i've found is to put an empty subcategory under those containing items.
In my case this work:
Category:
News
- Events
- Dummy Events
Please Log in or Create an account to join the conversation.
- Tomasz Bieliński
-
- Offline
- Senior Member
- Posts: 42
- when I link through the page (image of root category) to the same items from the same muliply category - I can see the category image
- this is only for multiple categories, for one category is OK
Is this normal? I checked it with one category and one or more sub-categories.
Please Log in or Create an account to join the conversation.
- Lars
-
- Offline
- New Member
- Posts: 9
My intention is to display a list of news 'most recent first', which can be accessed through a menu entry. The articles are all in the category 'News'.
Article ordering can be set (and it works on my system) when setting on the menu entry of type K2 - Item listings - Categories.
Only problem I have, is, that at least two categories have to be chosen to be able to change the ordering drop down box.
To solve this, I created a second category 'News2' which contains no articles. In the menu entry I choose both categories. Therefore the ordering drop down gets accessible and I can choose 'Most recent first'.
The second (empty) category has no side effect for my configuration and everything runs fine.
Lars
Please Log in or Create an account to join the conversation.
- gianpiero sfameni
-
Topic Author
- Offline
- New Member
- Posts: 10
This is my scenario:
1) Create New K2 Category
Title= Category1
Parent category= Top
Inherit parameter options from category= None
Extra Fields= None
Other layout options
Catalog mode= No
Featured Items= Show
Item ordering = Most Recent First
2) Create New K2 Item
Title= item1
Category=Category1
Creation date=2009-09-30 08:38:36
3) Create New K2 Item
Title= item2
Category=Category1
Creation date=2009-09-30 08:40:46
4) Create New K2 Item
Title= item3
Category=Category1
Creation date=2009-09-30 08:45:06
5) Create New Menu Item
Menu item type= K2 -> Item Listing -> Categories
Title= category1
Select categories= Category1
6) Debug Mode ON
This is my query:
SELECT i.*, c.name AS categoryname,c.id AS categoryid, c.alias AS categoryalias, c.params AS categoryparams
FROM jos_k2_items AS i
LEFT JOIN jos_k2_categories AS c
ON c.id = i.catid
WHERE i.published = 1
AND i.access <= 0
AND i.trash = 0
AND c.published = 1
AND c.access <= 0
AND c.trash = 0
AND ( i.publish_up = '0000-00-00 00:00:00' OR i.publish_up <= '2009-09-30 08:49:01' )
AND ( i.publish_down = '0000-00-00 00:00:00' OR i.publish_down >= '2009-09-30 08:49:01' )
AND c.id IN (25)
GROUP BY i.id
ORDER BY i.created DESC
LIMIT 0, 14
This is the result:
id title alias catid published introtext fulltext video gallery extra_fields extra_fields_search created
110 item1 item1 25 1 NULL NULL [] 2009-09-30 08:38:36
111 item2 item2 25 1 NULL NULL [] 2009-09-30 08:40:46
112 item3 item3 25 1 NULL NULL [] 2009-09-30 08:45:06
Most Recent item in this list is item3 and it is in last position!
Workaround found for this issue:
1) Add a subcategory to category1
2) Select 2 categories from the options "Select categorie" in the Menu
In this 2 cases the query change from "AND c.id IN (25) to "AND c.id IN (24,25)" and everything work fine!
3)Removing Group By, LINE 183 in \components\com_k2\models\itemlist.php (//$query .= " GROUP BY i.id";)
Last solution work fine but i don't know the impact of this change in other functionality of K2.
Please Log in or Create an account to join the conversation.
- Tomasz Bieliński
-
- Offline
- Senior Member
- Posts: 42
My intention is to display a list of news 'most recent first', which can be accessed through a menu entry. The articles are all in the category 'News'.
Article ordering can be set (and it works on my system) when setting on the menu entry of type K2 - Item listings - Categories.
Only problem I have, is, that at least two categories have to be chosen to be able to change the ordering drop down box.
To solve this, I created a second category 'News2' which contains no articles. In the menu entry I choose both categories. Therefore the ordering drop down gets accessible and I can choose 'Most recent first'.
The second (empty) category has no side effect for my configuration and everything runs fine.
Lars
I have done like you. Do you have "category description" field visible in such configuration (with linking from the menu)? I cant activate it from menu link only from page...
Please Log in or Create an account to join the conversation.
- Lars
-
- Offline
- New Member
- Posts: 9
I could imagine that it is not possible to turn it on in the menu in this constellation, because the system would not know, which categories' description to display.
Please Log in or Create an account to join the conversation.
- Lars
-
- Offline
- New Member
- Posts: 9
I would mainly check for scenarios, where the number of articles in a category is calculated and displayed.
Please Log in or Create an account to join the conversation.
- Tomasz Bieliński
-
- Offline
- Senior Member
- Posts: 42
Don't worry about the system, it knows :-). To show you what I mean check the attached files. As you see in "menu_view.jpg" K2 don't display category description, but when the same category is called from page (not from menu) you see the description (page_viw.jpg).
By the way: I can set one category A and sub categories 1,2, description can be in category A and link from the menu to category A with subcategories - I think it is OK to the system :-)
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
Gianpiero said:Trying to clarify. This is my scenario:
1) Create New K2 Category
Title= Category1
Parent category= Top
Inherit parameter options from category= None
Extra Fields= None
Other layout options
Catalog mode= No
Featured Items= Show
Item ordering = Most Recent First
2) Create New K2 Item
Title= item1
Category=Category1
Creation date=2009-09-30 08:38:36
3) Create New K2 Item
Title= item2
Category=Category1
Creation date=2009-09-30 08:40:46
4) Create New K2 Item
Title= item3
Category=Category1
Creation date=2009-09-30 08:45:06
5) Create New Menu Item
Menu item type= K2 -> Item Listing -> Categories
Title= category1
Select categories= Category1
6) Debug Mode ON
This is my query:
SELECT i.*, c.name AS categoryname,c.id AS categoryid, c.alias AS categoryalias, c.params AS categoryparams
FROM jos_k2_items AS i
LEFT JOIN jos_k2_categories AS c
ON c.id = i.catid
WHERE i.published = 1
AND i.access <= 0
AND i.trash = 0
AND c.published = 1
AND c.access <= 0
AND c.trash = 0
AND ( i.publish_up = '0000-00-00 00:00:00' OR i.publish_up <= '2009-09-30 08:49:01' )
AND ( i.publish_down = '0000-00-00 00:00:00' OR i.publish_down >= '2009-09-30 08:49:01' )
AND c.id IN (25)
GROUP BY i.id
ORDER BY i.created DESC
LIMIT 0, 14
This is the result:
id title alias catid published introtext fulltext video gallery extra_fields extra_fields_search created
110 item1 item1 25 1 NULL NULL [] 2009-09-30 08:38:36
111 item2 item2 25 1 NULL NULL [] 2009-09-30 08:40:46
112 item3 item3 25 1 NULL NULL [] 2009-09-30 08:45:06
Most Recent item in this list is item3 and it is in last position!
Workaround found for this issue:
1) Add a subcategory to category1
2) Select 2 categories from the options "Select categorie" in the Menu
In this 2 cases the query change from "AND c.id IN (25) to "AND c.id IN (24,25)" and everything work fine!
3)Removing Group By, LINE 183 in \components\com_k2\models\itemlist.php (//$query .= " GROUP BY i.id";)
Last solution work fine but i don't know the impact of this change in other functionality of K2.
Please Log in or Create an account to join the conversation.
- gianpiero sfameni
-
Topic Author
- Offline
- New Member
- Posts: 10
Thanks.
Lefteris Kavadas said:By the way the query K2 produces seems to be correct.
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
Please Log in or Create an account to join the conversation.