Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-17621

Popup browse mode navigator fails due to numbers typed as strings (patch)

    XMLWordPrintable

Details

    Description

      From customer issue:
      -----------------------------------------
      We can only see a maximum of 20 items when browsing for images.

      The form also breaks when navigating within the folder.

      There appears to be a JavaScript bug; you can see that the link for "Next >>" and "<< Previous" getting text appended to it where it appears math should be happening.
      -----------------------------------------

      I cannot reproduce this myself, but it is clear from the issue description that the numbers that are supposed to be added are instead concatenated because they are typed as strings. The fix is to enforce integer type.

      Steps to reproduce

      From customer issue:
      -----------------------------------------

      • Have more than 20 items in Media / Images
      • Edit an object with an XML block
      • Click the button to add an image
      • Click the "Browse" tab
      • Click the "Media" link
      • Click the "Images" folder
      • Click the "Next >>>" link

      At this point you should see another "Next >>" link because only 20 items have been shown, but we do not.

      • Click the "<< Previous" link
      • Click the "Next >>" link again

      At this point the form is entirely broken. No items are displayed, only a "Next >>" link that doesn't work.
      -----------------------------------------

      Attachments

        1. ezoe_17621_master.diff
          2 kB
        2. popup_utils.diff
          2 kB
        3. popup_utils.js.diff
          0.9 kB

        Activity

          People

            ls ls
            gl gl
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: