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

Selecting "edit description" for View All shows the System Message HTML text and tags.

      I have the latest Jenkins instance (1.656) and when I click on "edit description" for the View of the All tab, the text that is displayed in the screen is the System Message HTML text. This is consistent across three systems, and I've checked the html code in the description to verify it has no syntax issues (w3c verified). Does anyone know why Jenkins is displaying the System Message HTML text and tags when trying to edit the View description?

      I've upgraded several times through to the now current Jenkins 2.17 release and installed two additional Jenkins instances on new servers; but all show the same results. I'm using a RHEL5 and RHEL7 OS (various Java 1.7 and 1.8 installations) and installations on both OS's (and any Java) act the same way. Interestingly, three of my system also have a Virtual IP defined (so users don't have to enter the port 8080 on the URL) and when I login on the VIP then select the "edit description" for the View, I see the correct View html content in the text area, but not when I connect to the machines directly (i.e. as http://<machine_name>:8080/ instead of http://<VIP>/). If I edit the description of any other View (other than All) tab, I see the correct HTML text and tags no matter how I access the server.

      I've attached two screen shots. The first is the screen Jenkins screen with the System Message (in blue double border), and the View All description (in the green double border). The second screen shot is what is displayed when I click on the View "edit description" hyperlink.

      The Manage Jenkins, Configure System, Jenkins Location, Jenkins URL value is in the form of "http://<machine_name>:8080" on all the machines but one. That one is in the form "http://<machine_name.domain.com>:8080. None of the machines is configured to use the Virtual IP name for the Jenkins Master servers as the Jenkins Location URL.

      If I use the browser to view the html source with the View All tab selected, I can copy the HTML code from the browser then "edit description" for the View All tab, paste the copied code into the text area, make any needed updates, and save the results. The updated material will display, but when I click the "edit description" again, I see the System Message code, not the Vew All description HTML code.

          [JENKINS-37360] Selecting "edit description" for View All shows the System Message HTML text and tags.

          Brian Wilson added a comment -

          With many thanks to Daniel Beck:

          [07:24] <brianswilson> @danielbeck: Thank you for your comments on my ticket concerning editing the View All tab description yesterday. I've updated the ticket with the following information.
          [07:24] <brianswilson> https://issues.jenkins-ci.org/browse/JENKINS-37360
          [07:24] <@jenkins-admin> JENKINS-37360:Selecting "edit description" for View All shows the System Message HTML text and tags. (Open) https://issues.jenkins-ci.org/browse/JENKINS-37360
          [07:24] <brianswilson> I have five instances which all were started at various time and from various 1.XXX instances. Some were 1.5XX or 1.6XX instances. One was started from the 2.10 instance. All have been updated to the 2.17 as the current version with no problems. In response to the line: println(Jenkins.instance.primaryView); All the instances returned values on the order of : Result hudson.model.AllView@3464270a[view/All/]
          [07:25] <brianswilson> I assume this value is correct... ?
          [07:25] <@danielbeck> brianswilson unfortunately, it is
          [07:26] <@danielbeck> brianswilson taking another look
          [07:26] <brianswilson> Thank you! This one has got me stumped.
          [07:28] <@danielbeck> brianswilson okay, was able to reproduce it
          [07:28] <@danielbeck> brianswilson requires auto refresh to be enabled, which nobody in their right mind does
          [07:28] <brianswilson> Guess I'm crazy then.
          [07:29] <brianswilson> So no autorefresh and this works?
          [07:29] <brianswilson> Testing hypothesis.
          [07:30] <brianswilson> Hypothesis confirmed. With Autorefresh active, I get the System Message, with Autorefresh disabled, I get the View All description. Weird.
          [07:30] <brianswilson> The VIP connections didn't have auto refresh enabled. That's why they seemed to work.
          [07:30] <@danielbeck> brianswilson It should also only affect the default view, at the default URL
          [07:30] <brianswilson> Good to know. I will update the ticket.
          [07:30] <@danielbeck> brianswilson on the /view/All URL, it's also correct
          [07:31] <@danielbeck> it's related to how Jenkins makes default views work
          [07:31] <@danielbeck> and both Jenkins (system message) and a view having a 'description' field
          [07:33] <brianswilson> http://<machine_name>:8080/view/All/editDescription
          [07:33] <brianswilson> does seem to work regardless of the state of the Auto Refresh.
          [07:33] <brianswilson> I see the correct View All description in the text editing field.
          [07:34] <brianswilson> (I wasn't previously aware of this URL or I would have tried this sooner, thanks).

          Brian Wilson added a comment - With many thanks to Daniel Beck: [07:24] <brianswilson> @danielbeck: Thank you for your comments on my ticket concerning editing the View All tab description yesterday. I've updated the ticket with the following information. [07:24] <brianswilson> https://issues.jenkins-ci.org/browse/JENKINS-37360 [07:24] <@jenkins-admin> JENKINS-37360 :Selecting "edit description" for View All shows the System Message HTML text and tags. (Open) https://issues.jenkins-ci.org/browse/JENKINS-37360 [07:24] <brianswilson> I have five instances which all were started at various time and from various 1.XXX instances. Some were 1.5XX or 1.6XX instances. One was started from the 2.10 instance. All have been updated to the 2.17 as the current version with no problems. In response to the line: println(Jenkins.instance.primaryView); All the instances returned values on the order of : Result hudson.model.AllView@3464270a [view/All/] [07:25] <brianswilson> I assume this value is correct... ? [07:25] <@danielbeck> brianswilson unfortunately, it is [07:26] <@danielbeck> brianswilson taking another look [07:26] <brianswilson> Thank you! This one has got me stumped. [07:28] <@danielbeck> brianswilson okay, was able to reproduce it [07:28] <@danielbeck> brianswilson requires auto refresh to be enabled, which nobody in their right mind does [07:28] <brianswilson> Guess I'm crazy then. [07:29] <brianswilson> So no autorefresh and this works? [07:29] <brianswilson> Testing hypothesis. [07:30] <brianswilson> Hypothesis confirmed. With Autorefresh active, I get the System Message, with Autorefresh disabled, I get the View All description. Weird. [07:30] <brianswilson> The VIP connections didn't have auto refresh enabled. That's why they seemed to work. [07:30] <@danielbeck> brianswilson It should also only affect the default view, at the default URL [07:30] <brianswilson> Good to know. I will update the ticket. [07:30] <@danielbeck> brianswilson on the /view/All URL, it's also correct [07:31] <@danielbeck> it's related to how Jenkins makes default views work [07:31] <@danielbeck> and both Jenkins (system message) and a view having a 'description' field [07:33] <brianswilson> http://<machine_name>:8080/view/All/editDescription [07:33] <brianswilson> does seem to work regardless of the state of the Auto Refresh. [07:33] <brianswilson> I see the correct View All description in the text editing field. [07:34] <brianswilson> (I wasn't previously aware of this URL or I would have tried this sooner, thanks).

          Brian Wilson added a comment - - edited

          Many Thank you's to Daniel Beck for diagnosing this issue on his end!

          The issue (confirmed in Jenkins versions 1.XXX or 2.17 and prior) seems to be caused by having the AUTO REFRESH enabled then clicking on the View All "edit description" link.

          The work around fix is to either disable the AUTO REFRESH then click on the View All "edit description" link, or use a URL similar to the following to do the edits.

          http://<machine_name>:8080/view/All/editDescription

          or

          http://<VIP>/view/All/editDescription

          (if a Virtual IP is in use).

          Brian Wilson added a comment - - edited Many Thank you's to Daniel Beck for diagnosing this issue on his end! The issue (confirmed in Jenkins versions 1.XXX or 2.17 and prior) seems to be caused by having the AUTO REFRESH enabled then clicking on the View All "edit description" link. The work around fix is to either disable the AUTO REFRESH then click on the View All "edit description" link, or use a URL similar to the following to do the edits. http://<machine_name>:8080/view/All/editDescription or http://<VIP>/view/All/editDescription (if a Virtual IP is in use).

          Daniel Beck added a comment -

          This has been around at least since 1.532.3.

          Daniel Beck added a comment - This has been around at least since 1.532.3.

          Daniel Beck added a comment -

          Easy workaround present and went unnoticed for 3+ years, so I'm calling this Minor.

          Daniel Beck added a comment - Easy workaround present and went unnoticed for 3+ years, so I'm calling this Minor.

          Daniel Beck added a comment -

          1.509.4 is unaffected for the All view (probably because the All view had no separate description, its description was the system message and vice versa), 1.532.3 is.

          However, when changing the default view to a separate list view, the same issue occurs. Earliest Jenkins I tested was 1.466.2, and the issue occurs there as well.

          Daniel Beck added a comment - 1.509.4 is unaffected for the All view (probably because the All view had no separate description, its description was the system message and vice versa), 1.532.3 is. However, when changing the default view to a separate list view, the same issue occurs. Earliest Jenkins I tested was 1.466.2, and the issue occurs there as well.

          Daniel Beck added a comment - Related: https://github.com/jenkinsci/jenkins/commit/a6b3205b338a4e70a44ebe36b197a74b94e4618d https://github.com/jenkinsci/jenkins/commit/875b3f628b9127661a3b84945df30bcaf66f3534

          Code changed in jenkins
          User: Daniel Beck
          Path:
          core/src/main/resources/hudson/model/AbstractModelObject/editDescription.jelly
          http://jenkins-ci.org/commit/jenkins/ee447af7e8e283ff50032532a571766f810ea061
          Log:
          [FIX JENKINS-37360] Fix editing default view description with auto refresh (#2504)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: core/src/main/resources/hudson/model/AbstractModelObject/editDescription.jelly http://jenkins-ci.org/commit/jenkins/ee447af7e8e283ff50032532a571766f810ea061 Log: [FIX JENKINS-37360] Fix editing default view description with auto refresh (#2504)

          Oleg Nenashev added a comment -

          The fix has been merged towards jenkins-2.20

          Oleg Nenashev added a comment - The fix has been merged towards jenkins-2.20

          Code changed in jenkins
          User: Daniel Beck
          Path:
          core/src/main/resources/hudson/model/AbstractModelObject/editDescription.jelly
          http://jenkins-ci.org/commit/jenkins/065e1a3ae549a3800b57e98c0433b91d85b9ec72
          Log:
          [FIX JENKINS-37360] Fix editing default view description with auto refresh (#2504)

          (cherry picked from commit ee447af7e8e283ff50032532a571766f810ea061)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: core/src/main/resources/hudson/model/AbstractModelObject/editDescription.jelly http://jenkins-ci.org/commit/jenkins/065e1a3ae549a3800b57e98c0433b91d85b9ec72 Log: [FIX JENKINS-37360] Fix editing default view description with auto refresh (#2504) (cherry picked from commit ee447af7e8e283ff50032532a571766f810ea061)

          Jesse Glick added a comment -

          There has long been confusion in this area. I tried to clean it up a few years ago.

          Jesse Glick added a comment - There has long been confusion in this area. I tried to clean it up a few years ago.

            danielbeck Daniel Beck
            wilson_ds_net Brian Wilson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: