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

Plugin icons do not show in left navigation: duplicate slash before plugin path in image URL

      Since the update to 1.576, the icons generated by plugins on the left navigation bar no longer display. This is throughout the whole userinterface: homepage, job page,... (everywhere).

      The reason is that the image src URL is generated as "//plugin/...", which makes the browser resolve "plugin" as hostname. URLs starting with "//" mean "same protocol".

          [JENKINS-24316] Plugin icons do not show in left navigation: duplicate slash before plugin path in image URL

          Shannon Kerr added a comment -

          I see the same, but after rebooting the host I'm now no longer able to even login to Jenkins (we use AD authentication). Going to have to roll back to 1.575.

          Shannon Kerr added a comment - I see the same, but after rebooting the host I'm now no longer able to even login to Jenkins (we use AD authentication). Going to have to roll back to 1.575.

          Shannon Kerr added a comment -

          My login issue is different. It's because I checked the remember me button at login. This appears to be a new issue as well. I'll raise a ticket.

          Shannon Kerr added a comment - My login issue is different. It's because I checked the remember me button at login. This appears to be a new issue as well. I'll raise a ticket.

          Daniel Beck added a comment -

          Probably was never tested with empty context path...

          Daniel Beck added a comment - Probably was never tested with empty context path...

          Daniel Beck added a comment -

          Shannon: Did you already report the login issue? I cannot find it.

          Daniel Beck added a comment - Shannon: Did you already report the login issue? I cannot find it.

          Shannon Kerr added a comment - - edited

          Daniel, it's JENKINS-24317. The summary line of that ticket doesn't mention login, but after you read through it you realize that is what they are talking about. I originally raised ticket JENKINS-24321, but I closed it. Incidentally, if you can dup it to JENKINS-24317, I would appreciate it.

          Shannon Kerr added a comment - - edited Daniel, it's JENKINS-24317 . The summary line of that ticket doesn't mention login, but after you read through it you realize that is what they are talking about. I originally raised ticket JENKINS-24321 , but I closed it. Incidentally, if you can dup it to JENKINS-24317 , I would appreciate it.

          Daniel Beck added a comment -

          Thank you, I wasn't sure as it's also about log output. BTW JIRA creates a link when you use the project name correctly (i.e. allcaps): JENKINS-24317.

          Daniel Beck added a comment - Thank you, I wasn't sure as it's also about log output. BTW JIRA creates a link when you use the project name correctly (i.e. allcaps): JENKINS-24317 .

          Tom FENNELLY added a comment -

          I think this might already be fixed (probably by JENKINS-24181). I installed these plugins against the latest and the icons appear fine. I'll attach a screenshot.

          Tom FENNELLY added a comment - I think this might already be fixed (probably by JENKINS-24181 ). I installed these plugins against the latest and the icons appear fine. I'll attach a screenshot.

          I'm running a private build based off of commit 3efe07f563d30a3 (dated 14/August)

          Jenkins ver. 1.577-SNAPSHOT (private-08/19/2014 17:48 GMT-laptop)
          

          and still see the problem. I have confirmed and it does include commit 6f87e61ebe6ecd that mentions a fix for JENKINS-24181

          I see the problem with both disk-usage-plugin 0.24 and safe-restart-plugin 0.3

          Richard Mortimer added a comment - I'm running a private build based off of commit 3efe07f563d30a3 (dated 14/August) Jenkins ver. 1.577-SNAPSHOT (private-08/19/2014 17:48 GMT-laptop) and still see the problem. I have confirmed and it does include commit 6f87e61ebe6ecd that mentions a fix for JENKINS-24181 I see the problem with both disk-usage-plugin 0.24 and safe-restart-plugin 0.3

          Daniel Beck added a comment - - edited

          Tom: Make sure you run as java -jar jenkins.war and not mvn hpi:run to get rid of the context path /jenkins.

          Update: I checked, with empty context path, custom images don't show up. I.e. Jenkins at http://localhost:8080/jenkins works correctly, Jenkins at http://localhost:8080 does not.

          Daniel Beck added a comment - - edited Tom: Make sure you run as java -jar jenkins.war and not mvn hpi:run to get rid of the context path /jenkins . Update : I checked, with empty context path, custom images don't show up. I.e. Jenkins at http://localhost:8080/jenkins works correctly, Jenkins at http://localhost:8080 does not.

          Shannon Kerr added a comment -

          Thanks danielbeck. Will get that right going forward.

          Shannon Kerr added a comment - Thanks danielbeck . Will get that right going forward.

          Tim Brust added a comment -

          Same issue here!
          Hope this gets fixed soon

          Tim Brust added a comment - Same issue here! Hope this gets fixed soon

          Jonathan Crooke added a comment - - edited

          Seeing this for plugins myself, as well. 1.576 on OS X 10.9.4

          http://i.imgur.com/wkTMPEA.png

          Jonathan Crooke added a comment - - edited Seeing this for plugins myself, as well. 1.576 on OS X 10.9.4 http://i.imgur.com/wkTMPEA.png

          Uwe Schindler added a comment -

          This is not only visually annoying: At least Google Chrome does not respond to clicking links in the UI. You always have to click on browser's "Stop" button and then click on build's liks like "Artifacts", "Console". I think the reason for this behavior is maybe some Javascript onbly executed after the whole page loaded.

          Uwe Schindler added a comment - This is not only visually annoying: At least Google Chrome does not respond to clicking links in the UI. You always have to click on browser's "Stop" button and then click on build's liks like "Artifacts", "Console". I think the reason for this behavior is maybe some Javascript onbly executed after the whole page loaded.

          Got this same issue. I actually had ALL of my images stop working, then I reinstalled Jenkins (via apt-get) and now only the plugin images are not working. Although it seems that the Cloudbees Folder Plugin's "move" icon works just fine.

          Taylor Mansfield added a comment - Got this same issue. I actually had ALL of my images stop working, then I reinstalled Jenkins (via apt-get) and now only the plugin images are not working. Although it seems that the Cloudbees Folder Plugin's "move" icon works just fine.

          Tom FENNELLY added a comment -

          Ah ok.... sorry guys... I'll get this fixed ASAP. Thanks for the pointers Daniel.

          Tom FENNELLY added a comment - Ah ok.... sorry guys... I'll get this fixed ASAP. Thanks for the pointers Daniel.

          If it will help:

          When contextPath is not empty urls looks like /jenkins//plugin/jobConfigHistory/img/confighistory.png ( it just fools browsers )
          but url should look like : /jenkins/static/c582a0ff/plugin/jobConfigHistory/img/confighistory.png

          for some reason plugins icons path is not striped from leading slash and is ignored by task.jelly

          <j:set var="icon" value="${rootURL}${icon.startsWith('images/') || icon.startsWith('plugin/') ? h.resourcePath : ''}/${icon}"/>

          Denis Shvedchenko added a comment - If it will help: When contextPath is not empty urls looks like /jenkins//plugin/jobConfigHistory/img/confighistory.png ( it just fools browsers ) but url should look like : /jenkins/static/c582a0ff/plugin/jobConfigHistory/img/confighistory.png for some reason plugins icons path is not striped from leading slash and is ignored by task.jelly <j:set var="icon" value="${rootURL}${icon.startsWith('images/') || icon.startsWith('plugin/') ? h.resourcePath : ''}/${icon}"/>

          Code changed in jenkins
          User: tfennelly
          Path:
          core/src/main/resources/lib/layout/task.jelly
          test/src/test/java/lib/layout/IconTest.java
          test/src/test/resources/lib/layout/IconTest/01_testIcons.jelly
          test/src/test/resources/lib/layout/IconTest/03_testTask.jelly
          http://jenkins-ci.org/commit/jenkins/286337ea39c0db6e056af61e616736bafc5f0581
          Log:
          [FIXED JENKINS-24316] Fixed unknown task icon src path construction

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: tfennelly Path: core/src/main/resources/lib/layout/task.jelly test/src/test/java/lib/layout/IconTest.java test/src/test/resources/lib/layout/IconTest/01_testIcons.jelly test/src/test/resources/lib/layout/IconTest/03_testTask.jelly http://jenkins-ci.org/commit/jenkins/286337ea39c0db6e056af61e616736bafc5f0581 Log: [FIXED JENKINS-24316] Fixed unknown task icon src path construction

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3637
          [FIXED JENKINS-24316] Fixed unknown task icon src path construction (Revision 286337ea39c0db6e056af61e616736bafc5f0581)

          Result = SUCCESS
          tom.fennelly : 286337ea39c0db6e056af61e616736bafc5f0581
          Files :

          • test/src/test/resources/lib/layout/IconTest/03_testTask.jelly
          • core/src/main/resources/lib/layout/task.jelly
          • test/src/test/java/lib/layout/IconTest.java
          • test/src/test/resources/lib/layout/IconTest/01_testIcons.jelly

          dogfood added a comment - Integrated in jenkins_main_trunk #3637 [FIXED JENKINS-24316] Fixed unknown task icon src path construction (Revision 286337ea39c0db6e056af61e616736bafc5f0581) Result = SUCCESS tom.fennelly : 286337ea39c0db6e056af61e616736bafc5f0581 Files : test/src/test/resources/lib/layout/IconTest/03_testTask.jelly core/src/main/resources/lib/layout/task.jelly test/src/test/java/lib/layout/IconTest.java test/src/test/resources/lib/layout/IconTest/01_testIcons.jelly

          with last commit for task.jelly

          <j:if test="${!icon.startsWith('/')}">
          <j:set var="icon" value="/${icon}"/>
          </j:if>
          <j:set var="icon" value="${rootURL}${icon.startsWith('images/') || icon.startsWith('plugin/') ? h.resourcePath : ''}${icon}"/>

          icon always will startsWith / , and h.resourcePath will not be inserted in icon path. may be last row should look like ???

          <j:set var="icon" value="${rootURL}${icon.startsWith('/images/') || icon.startsWith('/plugin/') ? h.resourcePath : ''}${icon}"/>

          Denis Shvedchenko added a comment - with last commit for task.jelly <j:if test="${!icon.startsWith('/')}"> <j:set var="icon" value="/${icon}"/> </j:if> <j:set var="icon" value="${rootURL}${icon.startsWith('images/') || icon.startsWith('plugin/') ? h.resourcePath : ''}${icon}"/> icon always will startsWith / , and h.resourcePath will not be inserted in icon path. may be last row should look like ??? <j:set var="icon" value="${rootURL}${icon.startsWith('/images/') || icon.startsWith('/plugin/') ? h.resourcePath : ''}${icon}"/>

          Tom FENNELLY added a comment -

          @Denis Duh... you are totally right. Sorry about that. That just goes to prove that it's not a good idea making changes late at night... better to rest the brain Thanks for covering me Denis !!! I'll fix it ASAP.

          Tom FENNELLY added a comment - @Denis Duh... you are totally right. Sorry about that. That just goes to prove that it's not a good idea making changes late at night... better to rest the brain Thanks for covering me Denis !!! I'll fix it ASAP.

          Code changed in jenkins
          User: tfennelly
          Path:
          core/src/main/resources/lib/layout/task.jelly
          http://jenkins-ci.org/commit/jenkins/3daa6a97b02635d672e7646e83edb93abf50db06
          Log:
          Readd static resource path for task icons JENKINS-24316

          Missed this in previous commit - bad idea making even small changes late at night

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: tfennelly Path: core/src/main/resources/lib/layout/task.jelly http://jenkins-ci.org/commit/jenkins/3daa6a97b02635d672e7646e83edb93abf50db06 Log: Readd static resource path for task icons JENKINS-24316 Missed this in previous commit - bad idea making even small changes late at night

          Tim Brust added a comment -

          Looks good at my Jenkins again
          Thanks for the quick fix.

          Tim Brust added a comment - Looks good at my Jenkins again Thanks for the quick fix.

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3638
          Readd static resource path for task icons JENKINS-24316 (Revision 3daa6a97b02635d672e7646e83edb93abf50db06)

          Result = SUCCESS
          tom.fennelly : 3daa6a97b02635d672e7646e83edb93abf50db06
          Files :

          • core/src/main/resources/lib/layout/task.jelly

          dogfood added a comment - Integrated in jenkins_main_trunk #3638 Readd static resource path for task icons JENKINS-24316 (Revision 3daa6a97b02635d672e7646e83edb93abf50db06) Result = SUCCESS tom.fennelly : 3daa6a97b02635d672e7646e83edb93abf50db06 Files : core/src/main/resources/lib/layout/task.jelly

          Tested with latest git and the images are now properly displayed including the /static/xxxx prefix to help with caching.

          Thanks.

          Richard Mortimer added a comment - Tested with latest git and the images are now properly displayed including the /static/xxxx prefix to help with caching. Thanks.

          Shannon Kerr added a comment -

          I can confirm the same. My sandbox Jenkins is now functioning normally. Thanks for the quick fix implementation tfennelly. We all succumb to late night work bugs every once in a while.

          Shannon Kerr added a comment - I can confirm the same. My sandbox Jenkins is now functioning normally. Thanks for the quick fix implementation tfennelly . We all succumb to late night work bugs every once in a while.

          Uwe Schindler added a comment -

          Hi,
          replaced my WAR from the Ubuntu/Debian package in /usr/share/jenkins by the latest snapshot build -> works fine!
          Thanks!

          Uwe Schindler added a comment - Hi, replaced my WAR from the Ubuntu/Debian package in /usr/share/jenkins by the latest snapshot build -> works fine! Thanks!

          Code changed in jenkins
          User: tfennelly
          Path:
          core/src/main/resources/lib/layout/task.jelly
          test/src/test/java/lib/layout/IconTest.java
          test/src/test/resources/lib/layout/IconTest/01_testIcons.jelly
          test/src/test/resources/lib/layout/IconTest/03_testTask.jelly
          http://jenkins-ci.org/commit/jenkins/830a5e7f618a53a4ff3d1cad1127efc5fcc47601
          Log:
          [FIXED JENKINS-24316] Fixed unknown task icon src path construction

          (cherry picked from commit 286337ea39c0db6e056af61e616736bafc5f0581)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: tfennelly Path: core/src/main/resources/lib/layout/task.jelly test/src/test/java/lib/layout/IconTest.java test/src/test/resources/lib/layout/IconTest/01_testIcons.jelly test/src/test/resources/lib/layout/IconTest/03_testTask.jelly http://jenkins-ci.org/commit/jenkins/830a5e7f618a53a4ff3d1cad1127efc5fcc47601 Log: [FIXED JENKINS-24316] Fixed unknown task icon src path construction (cherry picked from commit 286337ea39c0db6e056af61e616736bafc5f0581)

          Code changed in jenkins
          User: tfennelly
          Path:
          core/src/main/resources/lib/layout/task.jelly
          http://jenkins-ci.org/commit/jenkins/5b805fa16e240e3657a7f263eeef11281a393efa
          Log:
          Readd static resource path for task icons JENKINS-24316

          Missed this in previous commit - bad idea making even small changes late at night

          (cherry picked from commit 3daa6a97b02635d672e7646e83edb93abf50db06)

          Compare: https://github.com/jenkinsci/jenkins/compare/bce92ec53dde...5b805fa16e24

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: tfennelly Path: core/src/main/resources/lib/layout/task.jelly http://jenkins-ci.org/commit/jenkins/5b805fa16e240e3657a7f263eeef11281a393efa Log: Readd static resource path for task icons JENKINS-24316 Missed this in previous commit - bad idea making even small changes late at night (cherry picked from commit 3daa6a97b02635d672e7646e83edb93abf50db06) Compare: https://github.com/jenkinsci/jenkins/compare/bce92ec53dde...5b805fa16e24

          Code changed in jenkins
          User: Daniel Beck
          Path:
          changelog.html
          http://jenkins-ci.org/commit/jenkins/4c0cfe40c9ebbea81bf2b8a6931cda3513be1bfe
          Log:
          Noting RC merge of JENKINS-24316, JENKINS-24317

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: changelog.html http://jenkins-ci.org/commit/jenkins/4c0cfe40c9ebbea81bf2b8a6931cda3513be1bfe Log: Noting RC merge of JENKINS-24316 , JENKINS-24317

          Daniel Beck added a comment -

          The fix will be in 1.577, scheduled to be released this weekend or so.

          Daniel Beck added a comment - The fix will be in 1.577, scheduled to be released this weekend or so.

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3646
          [FIXED JENKINS-24316] Fixed unknown task icon src path construction (Revision 830a5e7f618a53a4ff3d1cad1127efc5fcc47601)
          Readd static resource path for task icons JENKINS-24316 (Revision 5b805fa16e240e3657a7f263eeef11281a393efa)

          Result = SUCCESS
          Jesse Glick : 830a5e7f618a53a4ff3d1cad1127efc5fcc47601
          Files :

          • test/src/test/resources/lib/layout/IconTest/03_testTask.jelly
          • test/src/test/java/lib/layout/IconTest.java
          • core/src/main/resources/lib/layout/task.jelly
          • test/src/test/resources/lib/layout/IconTest/01_testIcons.jelly

          Jesse Glick : 5b805fa16e240e3657a7f263eeef11281a393efa
          Files :

          • core/src/main/resources/lib/layout/task.jelly

          dogfood added a comment - Integrated in jenkins_main_trunk #3646 [FIXED JENKINS-24316] Fixed unknown task icon src path construction (Revision 830a5e7f618a53a4ff3d1cad1127efc5fcc47601) Readd static resource path for task icons JENKINS-24316 (Revision 5b805fa16e240e3657a7f263eeef11281a393efa) Result = SUCCESS Jesse Glick : 830a5e7f618a53a4ff3d1cad1127efc5fcc47601 Files : test/src/test/resources/lib/layout/IconTest/03_testTask.jelly test/src/test/java/lib/layout/IconTest.java core/src/main/resources/lib/layout/task.jelly test/src/test/resources/lib/layout/IconTest/01_testIcons.jelly Jesse Glick : 5b805fa16e240e3657a7f263eeef11281a393efa Files : core/src/main/resources/lib/layout/task.jelly

          Hi, I've found that some plugin ( config-file-provider ) , starts suffering from similar trouble ( rendering icons by \jenkins\core\src\main\resources\lib\layout\layout.jelly in main-panel-content ). if you can classify it for jenkins issue , or plugin issue, please, it would be nice

          Denis Shvedchenko added a comment - Hi, I've found that some plugin ( config-file-provider ) , starts suffering from similar trouble ( rendering icons by \jenkins\core\src\main\resources\lib\layout\layout.jelly in main-panel-content ). if you can classify it for jenkins issue , or plugin issue, please, it would be nice

          Daniel Beck added a comment -

          dshvedchenko: If this occurs in 1.576, we don't care since there was a fix since. If it occurs in 1.577, please file a new issue against core and the plugin it occurs in as components, we'll sort it out. Make sure to use the label "user-experience".

          Daniel Beck added a comment - dshvedchenko : If this occurs in 1.576, we don't care since there was a fix since. If it occurs in 1.577, please file a new issue against core and the plugin it occurs in as components, we'll sort it out. Make sure to use the label "user-experience".

            tfennelly Tom FENNELLY
            thetaphi Uwe Schindler
            Votes:
            12 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved: