Skip to content

[5.x]: Only first entry in index shows thumbnail #17269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gregorterrill opened this issue May 14, 2025 · 4 comments
Closed

[5.x]: Only first entry in index shows thumbnail #17269

gregorterrill opened this issue May 14, 2025 · 4 comments
Labels

Comments

@gregorterrill
Copy link

What happened?

Description

In all of my entry indexes, only the first item in the list is showing the preview thumbnail next to the title:
Image

However, if I add the column for the asset field set to "Use for element thumbnails", it shows correctly in that column AND all of the preview thumbnails start working too:
Image

Removing that column again reverts it to the first screenshot, where only the first item has a thumbnail.

This is the case in multiple sections with different entry types, and it's not specific to particular entries (e.g. if I enter a search term so that "Winterlude" is the first item in the list, it shows its thumbnail while any subsequent entries do not, even though in the unfiltered view it did not show its thumnbail).

Craft CMS version

5.7.5

PHP version

8.2

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

No response

@brandonkelly
Copy link
Member

To be clear, your “Representative Image” field is set to “Use for element thumbnails” from the field layout designer, correct?

Assuming that’s the case, unfortunately I can’t reproduce. Can you send a database backup and your Composer files into [email protected] and point us to the section where this issue is occurring?

@gregorterrill
Copy link
Author

Yep, it is. Sent in the backup and files via email yesterday. I also just realized the same thing is happening in Matrix fields within entries, where the included entry blocks also have an asset field set to "Use for element thumbnails". Here, both of these have an asset set in the thumbnail field, but only the first in the list shows it. If I reorder the items, save and reload, then "Another Business" shows its thumbnail while "Whatever Inc" does not.

Image

Also if I double click the item in the second position, and resave it in the slideout, then the thumbnail appears in the second card - until I reload the page, and then it's gone again.

@brandonkelly
Copy link
Member

Thanks for sending those in. Tracked it down to the where field handle in your “Event (Internal)” entry type, which is conflicting with the $where property on the element query, resulting in this bug.

If you rename that to something else, all thumbnails will load. I’ve gone ahead and made where a reserved field handle for the next release.

@gregorterrill
Copy link
Author

Renaming that field did the trick! Appreciate you tracking that down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants