Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-39849

Lots of failed requests for i18n bundles in the console

    Details

    • Similar Issues:
    • Sprint:
      arctic, tasman

      Description

      https://github.com/jenkinsci/blueocean-plugin/blob/4a1ea8038ef3eec3c8cb5725050c888f97834292/blueocean-core-js/src/js/i18n/i18n.js#L16

      {urlConfig.getJenkinsRootURL()}} is never null and always returns a trailing slash

      {/}

      in the case of dogfood urlConfig.getJenkinsRootURL() will always be {/}

      . This causes the browser to call {{//i18n/resourceBundle?language=

      {lng}&baseName={ns}} which says the double slash should match the protocol (http or https)

      I think the fix is:
      
      

      const prefix = urlConfig.getJenkinsRootURL()
      const loadPath = `${prefix}i18n/resourceBundle?language={lng}

      &baseName=

      {ns}

      `;

      
      

        Attachments

          Issue Links

            Activity

            Hide
            tscherler Thorsten Scherler added a comment - - edited

            Yes James Dumay will fix it now.

            ...but for dog food you find

             <head data-rooturl="" data-adjuncturl="/adjuncts/19255aac" data-resurl="/static/19255aac" data-appurl="/blue">
            

            and in the urlconfig.js we do

            jenkinsRootURL = headElement.getAttribute('data-rooturl');
            

            which leaves us with "" so I need to implement some "insurance" that we always have trailing "/" if we would implement your solution.

            In localhost that resolves to

             <head data-rooturl="/jenkins" data-adjuncturl="/jenkins/adjuncts/13f8d597" data-resurl="/jenkins/static/13f8d597" data-appurl="/jenkins/blue">
            

            which means we never use trailing slash (the opposite of your observations) and we can just drop the default value and all is good.

            Show
            tscherler Thorsten Scherler added a comment - - edited Yes James Dumay will fix it now. ...but for dog food you find <head data-rooturl= "" data-adjuncturl=" /adjuncts/19255aac " data-resurl=" / static /19255aac " data-appurl=" /blue"> and in the urlconfig.js we do jenkinsRootURL = headElement.getAttribute( 'data-rooturl' ); which leaves us with "" so I need to implement some "insurance" that we always have trailing "/" if we would implement your solution. In localhost that resolves to <head data-rooturl= "/jenkins" data-adjuncturl= "/jenkins/adjuncts/13f8d597" data-resurl= "/jenkins/ static /13f8d597" data-appurl= "/jenkins/blue" > which means we never use trailing slash (the opposite of your observations) and we can just drop the default value and all is good.

              People

              • Assignee:
                tscherler Thorsten Scherler
                Reporter:
                jamesdumay James Dumay
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: