The Article sorting does not work properly if subordinate Article are displayed at Category Blog Layout > Article Order > Recent First & Include Subcategories Aricles (See attached Screenshot debug_view.html.php.jpg (Tested by echo debuging > print display publish date as attached))
reproduce Article Dates, Category affiliation and Category tree as in attached screenshots please:
Articles must be assigned to different categories (See attached Screenshots articles and categories.jpg)
And menu component setting as attached (cat menu item.jpg) Tested by publishing date > Recent First
screen shot 2016-03-30 at 12 11 59 cat menu item!
screen shot 2016-03-30 at 12 12 09 debug_view.html.php!
screen shot 2016-03-30 at 12 12 10 articles and categories.jpg!
Sorting as following
2016-03-27 14:42:38
2016-01-29 14:43:46
2016-01-27 14:44:52
2015-12-22 14:45:41
2015-12-21 14:46:24
2015-12-21 14:47:04
2015-12-06 14:48:08
Sorting is confused as following
2016-01-29 14:43:46
2016-01-27 14:44:52
2015-12-21 14:46:24
2016-03-27 14:42:38
2015-12-21 14:47:04
2015-12-06 14:48:08
2015-12-22 14:45:41
Tested on
Joomla 3.4.7 and 3.5.0 (Both blank installation with new content as attached, just modfied
components\com_content\views\category\view.html.php width echo debuging code snippet)
Apache 2.4.18
PHP 5.6.17 and 5.6.19
MySQL 5.7.10 and 5.6.15
By Sorting "Most Recent first" sorting ist confused mixed
By Sorting "Oldes first" sorting is correct.
(Quick n Dirty Bug Fix: Set Order to > Oldes First and change foreach to array_reverse())
Status | New | ⇒ | Information Required |
Category | ⇒ | Components |
Yes! Could you also reconstruct that problem?
And nope, at me on GitHub all screenshots were loaded. See:
https://issues.joomla.org/uploads/1/6d52bb91208986ae7a1f99871e7132f1.jpg
https://issues.joomla.org/uploads/1/13c4c5625fad85b05db57ca5d0e7b7aa.jpg
https://issues.joomla.org/uploads/1/01dec4ba21268aa39563f71ff12a8fe9.jpg
Sorry I misread your original post. I assumed the time and date in the sorting example was a screenshot name
Status | Information Required | ⇒ | New |
In the Blog layout tab ... what setting is 'Category Order' ? If Global what is the Global setting for it ?
@Webdongle
Category Order is set to "Global" and Gloabl Order ist set to "Category Order"
To reproduce it, see attached screenshots above.
If you look at your results you should see that they are in order per category ?
Expected result Articles of first Category in date order then second Articles of the second Category in date order etc.
(i.e. it sorts by Category then by date order)
If you set the Category Order to 'No Order' then the Articles should be in date order regardless of Category.
@Webdongle nope, did not work. But it did work by oldes first when it is setting up by oldes article first!
This is confused to me.
As i see, it is a problem with sort function usort() and mutlidimensional array with certain numbers.
The more crazy confusion is, when i change Order to > Oldes First
and than do a hardcode change of sort function by
foreach to array_reverse()) than it works?
Please exactly reproduce my screenshots,
means exactly same category structure and same dates of articles, than you could see that problem.
It looks to me very strongly as a php usort() mutlidimensional array sort problem!
Hello! Sorry for my english. I think i solve that problem today. I just fill fields in blog category settings, like that:
Leading Articles - 0
Intro Articles - 20
Columns - 1
And it works! Articles sorting well
Is this still a problem? It is unclear from the conversation above if this is resolved?
Status | New | ⇒ | Information Required |
I had this problem and finally after a few hours I realized that I have COPIED one article several times and those hsve the same CREATED dates. So it work only with newly created articles!
So it is working correctly. If the created date is the same then they can't
be sorted by the date
Yes, this was the problem at me and I think at several other guys as well.
Maybe the solution for this human mistake could be the copied article gets the current date. BUT in this case the publishing D/T could cause problem. So it is better to leave this as it is now.
@brianteeman Think this is a really special Problem, but it exists and should be solved.
@GESign the problem has nothing to do with copying articles. It exists after creation.
By Sorting "Most Recent first" sorting ist confused mixed
By Sorting "Oldes first" sorting is correct.
I´ve tested the fix below that helps for me. Sure, we can not implement this to Joomla.
So implement array_reverse() if order is "Most Recent first"
(ToDo: change foreach to array_reverse()) if order is "Most Recent first")
But it shows it must be a problem with sort function.
we testet this issue with florian in our JUG and there is no bug. the sorting works fine.
Tested on Database Version 5.5.5-10.1.13-MariaDB, php 7.0.6, Apache/2.4.18
JUP, that was a misunderstanding.
Tanks for testing @joomlamarco
I´ll Close the issue now!
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-10-04 17:14:43 |
Closed_By | ⇒ | Didldu-Florian |
It looks like something went wrong and most of your screenshots are missing.
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9677.