Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-10034

Paging broken in opensocial widgets by document with null fields

    XMLWordPrintable

    Details

      Description

      This new bug was introduced by NXP-9765. a few calls to escapeString were added, but no check to ensure the field is really a string is done. The result is that null values on a document properties generates a javascript exception and stops the loading of the gadget in the gadgets.util.escapeString() calls.

      I'd expect some type casting if escapeString is to be used like follows, which would provide the same behaviour as before:

      html += gadgets.util.escapeString(String(dashBoardItem.title)); 

      See faulty commit:
      https://github.com/nuxeo/nuxeo-opensocial/commit/38f634f4a617e8cecaff267bd93155db08452861#nuxeo-opensocial-gadgets/src/main/resources/web/nuxeo.war/scripts/opensocial/gadgets/default-documentlist-display.js

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: