MG 2.2 Widget carousel media bug ? Or not...

nicodak

Well-known member
Hello,

How many photos minimum is needed in a category for the widget to be set to random images?

Because I have a widget set to random image and there are 11 photos in the category, and the widget should display 6 but most of the time it shows only one, two, three, sometimes 4 but never all 6. It even happens that it does not display any photos and there it completely disappears from its location. With a setting on recent images no problem.

Thanks !
 

Chris D

XenForo developer
Staff member
The way random media works is very deliberate because typically selecting random records from MySQL is extremely unperformant so we do it in a very specific way but the trade off is this can happen particularly with much smaller sets of records.

I can't really answer the question but basically the more media items you have, the less likely it is to happen. It can still happen even if you have many items, if I recall correctly, but it will be much less frequent.
 

nicodak

Well-known member
Thanks for the clarification, the other widgets set the same have never produced this but I have enabled them with at least 30 images in the categories, currently they are around 70 so I think it's ok now.

But what is strange is that the album carousel does not produce this "malfunction" when there are only 9 albums, the widget is always full.
 

nicodak

Well-known member
But what is strange is that the album carousel does not produce this "malfunction" when there are only 9 albums, the widget is always full.
How to explain that the widget of the albums is not affected by this problem? Doesn't it work the same?
I cannot resolve the issue on my last 2 carousels which must display 5 photos from categories which have at least 40 but despite everything the widget often appears with missing thumbnails ...

Thanks.
 

nicodak

Well-known member
Up !
How to explain that the widget of the albums is not affected by this problem? Doesn't it work the same?

By the way, I have a media carousel widget set to 1 media to display and it is pointing to a category with 25 items, most of the time the widget don't display anything... 8 times on 10 :(
 

nicodak

Well-known member
Sorry to revive the topic again but I would really like to understand what is happening with the random image widgets and why it is not considered a bug knowing that they are unusable under certain conditions.

I have a widget that is set to serve 2 random images from a media library category that has 42. @ChrisD I understand that the SQL system performs very poorly with so little "stock" of images.
However, the widget rarely displayed empty spaces, sometimes a single image, so it was quite acceptable. I add 4 photos in the "stock" and there everything becomes catastrophic! Most of the time the widget no longer displays anything, from time to time it only displays one image and almost never it displays two images!

Isn't there another way to make this widget work randomly?
 
Top