Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-41237

Cannot pass map of String[] to schedulePublishToLive due to type conversion problem

    Details

      Description

      Go to API page and try the following call:

      Liferay.Service(
        '/layout/schedule-publish-to-live',
        {
          sourceGroupId: 123,
          targetGroupId: 123,
          privateLayout: true,
          layoutIdMap: {123:true},
          parameterMap: {'p1':['one', 'two']},
          scope: 'scope',
          startDate: 1380872622856,
          endDate: 1380872622856,
          groupName: 'group',
          cronText: 'cron',
          schedulerStartDate: 1380872622856,
          schedulerEndDate: 1380872622856,
          description: 'description'
        },
        function(obj) {
          console.log(obj);
        }
      );
      

      Put the breakpoint in the LayoutServiceImpl#schedulePublishToLive(), right at the method start. Examine values for parameterMap.

      Instead of having a string array of

      "one","two"
      

      it will have the values:

      "[one","two]"
      

      This issue is in the 3rd party library, Jodd, that we use for type conversions.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                brian.chan Brian Chan
                Reporter:
                igor.spasic Igor Spasic (Inactive)
                Participants of an Issue:
                Recent user:
                Esther Sanz
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  6 years, 6 weeks, 1 day ago

                  Packages

                  Version Package
                  6.1.X EE
                  6.2.0 CE RC5