Skip to content

Fixes problem with collection's image#917

Open
DBinaghi wants to merge 1 commit intoomeka:masterfrom
DBinaghi:patch-9
Open

Fixes problem with collection's image#917
DBinaghi wants to merge 1 commit intoomeka:masterfrom
DBinaghi:patch-9

Conversation

@DBinaghi
Copy link
Copy Markdown
Contributor

It seems that, when a Collection contains no Item with an image (because that Item's image was not generated, and Item is resorting to fallback image when shown), then the Collection itself does not show any image, not even the fallback one.
This fix solves the problem: if no Item with an image is found, than function tries to find any Item and, in absence of an image, the fallback one will be used for the Collection too. Sort field and direction are mantained, as a featured Item could exist even if it didn't have an image.

It seems that, when a Collection contains no Item with an image (because that Item's image was not generated, and Item is resorting to fallback image when shown), then the Collection itself does not show any image, not even the fallback one.
This fix solves the problem: if no Item with an image is found, than function tries to find any Item and, in absence of an image, the fallback one will be used for the Collection too. Sort field and direction are mantained, as a featured Item could exist even if it didn't have an image.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant