No Code Attached Yet bug
avatar PixedBo
PixedBo
19 Nov 2023

Steps to reproduce the issue

Create a classic blog layout menu, set the ordering to "random", have enough articles to go to page 2.

Expected result

My articles show up in random order, but if i go to page 2 i get all the articles still in random order but without any articles i got in page 1

Actual result

Page 2 ignores page 1 and shows some of the articles already shown in page 1. So pagination is irrelevant and every page show a random selection of all the articles available.

System information (as much as possible)

Joomla5, php 8.2.9

Additional comments

I don't know how "random" works in joomla so maybe this is working as intended. Anyway I how there is a way to "pre-compile" the full list in order to have all articles (in random order) in every page, without repetitions.

avatar PixedBo PixedBo - open - 19 Nov 2023
avatar joomla-cms-bot joomla-cms-bot - change - 19 Nov 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 19 Nov 2023
avatar Hackwar Hackwar - change - 27 Mar 2024
Labels Added: bug
avatar Hackwar Hackwar - labeled - 27 Mar 2024
avatar Hackwar Hackwar - change - 27 Mar 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-03-27 11:27:36
Closed_By Hackwar
avatar Hackwar Hackwar - close - 27 Mar 2024
avatar Hackwar
Hackwar - comment - 27 Mar 2024

This actually does work as expected. If you choose random order, that order is not saved anywhere and the articles will be randomly sorted upon each loading of the page. If you want to have a random, but stable order, you would have to choose a different sorting method and set the data for that manually.

avatar brianteeman
brianteeman - comment - 27 Mar 2024

It might be how you expect it to work but its certainly not logical for anyone else to assume that. Think about it. All the other "order" options work across pages so there is no way that anyone could assume that "random" does not appear across pages.

avatar PixedBo
PixedBo - comment - 27 Mar 2024

Thanks for your answers. The topic is closed but i would like to comment further if possible.
With custom fields is now very easy to create directory websites. I more and more use joomla articles to create complex and vast websites.
Some of them contains lists of partners, employees, consultants, doctors, and so on that need to be listed somewhere. The problem is that the date order or the alphabetical order are always unfair because they always give more importance to someone instead of someone else.
In these cases the random order is perfect but if you have 50/100/200 or more entries have all of them in one single page is unpractical but splitting in more pages is now impossibile: some items can show in page 1 and page 3, or some items may not appear anywhere. The very concept of pagination falls apart because with random sorting it says 'page 1 of 8' but in reality it is not really 8 pages, it is 8 similar screens with X elements taken at random from a larger list.

avatar Fedik
Fedik - comment - 27 Mar 2024

Random is random.
When need a determined order, then it is not a random. Easy ?
What is not logical?

The issue is well known, it not joomla, but a nature of random behavior.

@PixedBo for your case, what you actualy can do is to make a plugin that change orderby_sec periodicaly, to one of these values

<option value="front">COM_CONTENT_FEATURED_ORDER</option>
<option value="rdate">JGLOBAL_MOST_RECENT_FIRST</option>
<option value="date">JGLOBAL_OLDEST_FIRST</option>
<option value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
<option value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
<option value="author">JGLOBAL_AUTHOR_ALPHABETICAL</option>
<option value="rauthor">JGLOBAL_AUTHOR_REVERSE_ALPHABETICAL</option>
<option value="hits" requires="hits">JGLOBAL_MOST_HITS</option>
<option value="rhits" requires="hits">JGLOBAL_LEAST_HITS</option>
<option value="random">JGLOBAL_RANDOM_ORDER</option>
<option value="order">JGLOBAL_ORDERING</option>
<option value="rorder">JGLOBAL_REVERSE_ORDERING</option>
<option value="vote" requires="vote">JGLOBAL_VOTES_DESC</option>
<option value="rvote" requires="vote">JGLOBAL_VOTES_ASC</option>
<option value="rank" requires="vote">JGLOBAL_RATINGS_DESC</option>
<option value="rrank" requires="vote">JGLOBAL_RATINGS_ASC</option>

So let say, 1 hour order by "title", next hour order by "ordering", and another hour order by "title reveres" and so on.

avatar PixedBo
PixedBo - comment - 27 Mar 2024

Random is random. When need a determined order, then it is not a random. Easy ? What is not logical?

The issue is well known, it not joomla, but a nature of random behavior.

I'm not arguing about the nature of the "random" concept, my issue was about the whole pagination system of articles that falls apart if i want to display 200 articles in random orderd diveded in 10 pages. If I choose to see a list of items in random order and the system itself let me divide them by 10 i naively expet to see all 200 in 10 pages but in random order. Seeing 20 then going to page 2 and see agin some old items mixed with new items is counterintuitive imho. Browsing 10 pages with repetitions and the possibility of not seeing certain elements at all is not random, is chaos.

Anyway no problem, i get that this is how the system works and i'll live with it. I'm not a developer so i'll no try to develop a plugin (but thanks for the hint) I am just an enthusiast who wanted to express his point of view

Add a Comment

Login with GitHub to post a comment