collectiveaccess / pawtucket2

Pawtucket Improved
GNU General Public License v3.0
82 stars 75 forks source link

Can't View More Than 11 Reps Per Object #128

Open miqrogroove opened 5 days ago

miqrogroove commented 5 days ago

When an object has more than 11 representations, all additional reps are null in the the slide list.

https://github.com/collectiveaccess/pawtucket2/blob/45a83da3c468c676df2f80f5c37a9f577052793d/app/helpers/displayHelpers.php#L4242

In displayHelpers.php::caRepresentationViewerHTMLBundles() when the output array is appended with an 11th value (count > 10) the function breaks both loops and returns the first 11 values.

This bug appears to affect all branches.

collectiveaccess commented 5 days ago

It's a limit that was intentionally added at the request of users back in the day. The idea was to prevent unmanageable lists of media on records where cataloguers had added many many images, often in error.

It would be better to make this configurable, but the limit is still something that some users want/need.

miqrogroove commented 5 days ago

This needs to be reconciled with themeHelpers.php::caObjectRepresentationThumbnails() returning an unlimited list of thumbnails. It is definitely a bug of some kind when one feature is broken by another feature's intentional limitation.

With the slide list and thumbnail list having different ordering, this will be a bit of a challenge. Any solution must also consider that the primary representation could be more than position 11 among existing representations.