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

Pagination is broken on several gadgets

    XMLWordPrintable

    Details

      Description

      Pagination is broken on several gadgets, including articles & news.

      This is caused by a old commit (https://github.com/nuxeo/nuxeo-social-collaboration/commit/858a2607bbc12d619e6fd680bb9fa3c2556cfe25) made to change all "pageSize" occurrences to "limit", including in the Social.Provider operation (https://github.com/nuxeo/nuxeo-social-collaboration/blob/master/nuxeo-social-workspace/nuxeo-social-workspace-gadgets/src/main/java/org/nuxeo/ecm/social/workspace/gadgets/SocialProviderOperation.java).

      Unfortunately some .js files using this operation have been forgotten in the process. Example of required change:

      --- a/nuxeo-social-workspace/nuxeo-social-workspace-gadgets/src/main/resources/web/nuxeo.war/scripts/opensocial/gadgets/articles.js
      +++ b/nuxeo-social-workspace/nuxeo-social-workspace-gadgets/src/main/resources/web/nuxeo.war/scripts/opensocial/gadgets/articles.js
      @@ -4,7 +4,7 @@ var NXRequestParams = {
         operationId : 'Social.Provider',            // id of operation or chain to execute
         operationParams : {
           query : "Select * from Article WHERE ecm:isProxy = 0 and ecm:currentLifeCycleState <> 'deleted'",
      -    pageSize : 5,
      +    limit : 5,
           contextPath : getTargetContextPath(),
           documentLinkBuilder: prefs.getString("documentLinkBuilder")
         },  // parameters for the chain or operation
      

      I'll submit a pull request to fix this issue.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: