-
Bug
-
Resolution: Duplicate
-
Neutral
-
None
-
5.4.2
-
None
-
None
When there are less than 3 assets opening the thumbnail view in the assets app results in a division by zero error.
In info.magnolia.ui.workbench.thumbnail.JcrThumbnailContainer#setPageSize pageSize gets divided by 3, but since this in an integer division 2/3 = 0.
Then in AbstractJcrContainer#updateOffsetAndCache you get a division by zero in this code:
currentOffset = (index / (pageLength * cacheRatio)) * (pageLength * cacheRatio);
(Maybe this calculation should be more like the one in AbstractJcrContainer#indexOfId, which has a similar statement, but with +1 in the division?)
Acceptance criteria
- duplicates
-
MGNLUI-3502 Exception in thumbnail view when having less than 2 data items
- Closed