Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-14039

Channel Mgr Toolbar should be more resilient for invalid spa URL

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • High
    • Resolution: Fixed
    • None
    • 14.5.0
    • None
    • None
    • 0.5
    • Quasar
    • Puma Sprint 247, Puma Sprint 249

    Description

      If the org.hippoecm.hst.configuration.channel.PreviewURLChannelInfo_url is an invalid URL, then the frontend code uses the Channel Property in channel.service.js in:

        getOrigin() {
          const properties = this.getProperties();
          const channel = this.getChannel();
          const url = (properties && properties[PROPERTY_SPA_URL]) || (channel && channel[PROPERTY_URL]);
      
          if (!url) {
            return;
          }
      
          try {
            const { origin } = new URL(url);
      
            // eslint-disable-next-line consistent-return
            return origin;
          } catch (error) {} // eslint-disable-line no-empty
        }
      

      but now the new URL(url) returns in an error and then the catch clause does a silent fail and the Channel mgr settings are not shown. The frontend should be more resilient

      Attachments

        Issue Links

          Activity

            People

              ntrajkovski Nikola Trajkovski
              aschrijvers Ard Schrijvers
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: