collectiveaccess / pawtucket2

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

Variable Scope Bug in Rep Viewer's setItem() #123

Closed miqrogroove closed 2 months ago

miqrogroove commented 2 months ago

This param name conflicts with the global let index statement.

https://github.com/collectiveaccess/pawtucket2/blob/63f8c0ac8acc7b99225fc59ba5e4db9fa51c65cf/themes/default/views/bundles/representation_viewer_html.php#L84

Steps to reproduce:

  1. Go to object detail page having 3 or more representations.
  2. Click on a middle thumbnail.
  3. Click the right arrow link (next item).

Expected result:

The next item should be displayed.

Actual result:

The 2nd item is displayed, regardless of previous thumbnail clicks.

miqrogroove commented 2 months ago

That commit doesn't look quite right to me...

collectiveaccess commented 2 months ago

Serves me right for doing this while doing something else. It's a typo. Just pushed a correction.