?
avatar jlcfly
jlcfly
16 Dec 2015

Steps to reproduce the issue

Create two or more articles and flag as featured articles
Set home page to display featured articles
Set the order of featured articles by the Ordering column. Articles are uncategorized

Expected result

Featured articles should display in the order specified

Actual result

Featured articles not displaying the the order specified. Seems to be using a reverse date entered order instead.

System information (as much as possible)

Windows 10
IIS 10
PHP 5.4.17
MySQL 5.7

Additional comments

In components/com_contents/models/featured.php, getListQuery(), confirmed that $categoryOrderby is set to 'order'.

This line passes it in here:
$primary = ContentHelperQuery::orderbyPrimary($categoryOrderby);

The problem is, this method returns an unexpected value (file is: components/com_contents/helpers/query.php):
case 'order' :
$orderby = 'c.lft, ';
break;

To order by the 'ordering' column in content_frontpage, the orderbyPrimary should return 'fp.ordering' when 'order' is passed in instead of 'c.lft'. I have not dug in much further, as changing this works, but it probably breaks something else. I'm very new to Joomla, so I suspect there's a completely different 'order' for categories that this is working on, and the 'order' for featured articles is not accounted for somehow. Regardless, once this change was made locally, the order specified in the administration section for featured articles started working properly. This probably isn't the definitive fix needed, but it seems to be the area that needs to be looked at closer.

avatar jlcfly jlcfly - open - 16 Dec 2015
avatar brianteeman
brianteeman - comment - 16 Dec 2015

I cannot confirm this. What I did.
Created several articles and marked them as featured.
In content-navigation>featured articles I set the order
Created menu item of type featured
In layout tab i set article order to "featured articles order'
The articles were displayed as expected

avatar jlcfly
jlcfly - comment - 16 Dec 2015

Ahhhh. You had one step in there I missed, setting the article order in the menu item's layout tab. You are right. Setting that there does make it work. Thank you for that. You can close this ticket.

Date: Wed, 16 Dec 2015 14:50:14 -0800
From: notifications@github.com
To: joomla-cms@noreply.github.com
CC: jlcfly@hotmail.com
Subject: Re: [joomla-cms] Featured article ordering not honored (#8719)

I cannot confirm this. What I did.

Created several articles and marked them as featured.

In content-navigation>featured articles I set the order

Created menu item of type featured

In layout tab i set article order to "featured articles order'

The articles were displayed as expected


Reply to this email directly or view it on GitHub.

avatar brianteeman brianteeman - change - 16 Dec 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-12-16 23:15:39
Closed_By brianteeman
avatar brianteeman brianteeman - close - 16 Dec 2015

Add a Comment

Login with GitHub to post a comment