Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-10168

Call AmetysXSLTHelper.serviceParameter(dataPath) failed on a multiple but empty value

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 4.8.4, 4.7.17, 4.9.0
    • None
    • None
    • None

      For sample, link directory service has a multiple type parameter "themes".

      Calling ametys:serviceParameter('themes') failed when service is configured with no theme.

      Indeed, the stored value is a emty String array.

      But the AmetysXSLTHelper._hasParameterValueOrDefaultValue considers there is a value because the value is not null.

      So then try to treat the value and call a dataHolder.getValue with a default value "" which is not a String array => ClassCastException

      There is two issues here :

      1. the empty string array is not considered has no value. May the hasNomEmptyValue method should becomes a API method and call here
      2. when not specified, the serviceParamerter is called with the default value "", which is not typed, and not take into account of the multiple or not status

       

            Unassigned Unassigned
            laurence Laurence Aumeunier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: