collectiveaccess / pawtucket2

Pawtucket Improved
GNU General Public License v3.0
85 stars 76 forks source link

Multiple images attached to one object #85

Closed atzemaej closed 8 months ago

atzemaej commented 1 year ago

In a response to my posting on the Support Forum, Monica suggested that I submit the following behavior as a likely bug:

I am using the dev/php8.1 branch of Pawtucket2. My issue is with multiple representations attached to an object. When there is only one single image attached, pulling up the info on the object displays everything perfectly fine. When there are multiple images attached, jcarousel displays the thumbnails fine. However, upon clicking a thumbnail or the arrows, there is always one image that will not be displayed in full, nor will its caption show. It is always the last image listed in Providence, except when that last image is the primary representation, in which case the penultimate image will not show. As far as I can tell, this behavior does not occur in Providence.

Monica suggested this behavior might be a counter issue and for what it is worth, I agree.

miqrogroove commented 1 year ago

I tried debugging this many times in v1.7.15. I couldn't figure out if it's a jcarousel bug or a template bug. All of the images load in the background, but one of the div coordinates stays stubbornly offscreen. The carousel scrolls out of view when clicking on the last thumbnail first.

miqrogroove commented 1 year ago

Also beware the dev/php8 branch is missing patches that I wrote for the master branch. For example, #54 and #70

atzemaej commented 1 year ago

Both your recent comments seem very helpful. Maybe somebody can actually have a closer look at it. I doubt I am the only one running into this issue. Thanks, Eisso

On Mon, Oct 9, 2023 at 11:45 AM miqrogroove @.***> wrote:

Also beware the dev/php8 btanch is missing patches that I wrote for the master branch. For example,

https://github.com/collectiveaccess/pawtucket2/pull/54/files

— Reply to this email directly, view it on GitHub https://github.com/collectiveaccess/pawtucket2/issues/85#issuecomment-1753253963, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBS5GQ2SOA3DQOBAOG4XGE3X6QLZNAVCNFSM6AAAAAA24OMD26VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJTGI2TGOJWGM . You are receiving this because you authored the thread.Message ID: @.***>

-- Eisso J. Atzema 10 Old Mill Road Old Town, ME 04468 United States Tel.: 207-817-0388

miqrogroove commented 1 year ago

I did some more spot testing this morning and found a potential pattern: In carousels where all of the thumbnails are displayed at the same height, the bug goes away. It's the objects where the first thumbnail is taller than the last thumbnail where I can always reproduce this bug. Possibly objects where the penultimate thumbnail is taller than the last thumbnail.

miqrogroove commented 1 year ago

I wrote a patch that fixes this by checking if the last thumbnail was clicked, and then force loading the penultimate media prior to the last media. I don't know why it works and the code is hideous. If I can't improve on that I will just upload it and await feedback.