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

Cannot add Maven installation in UI in 2.320

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      2.321

      Description

      Steps to reproduce

      1. Install Jenkins 2.320 with the default suggested plugins.
      2. Go to /configureTools
      3. Under Maven installations, click on Add Maven.

      Expected results

      Note: These are the actual results prior to commit e38b353380.

      A form to add a new Maven installation appears on the screen.

      Actual results

      The Maven section disappears.

      Evaluation

      This behavior started occurring with this commit:

      commit e38b353380
      Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
      Date:   Thu Nov 4 13:12:41 2021
      
          Modernise the 'New view' and 'New node' pages (#5842)
      

      CC Jan Faracik

        Attachments

          Issue Links

            Activity

            Hide
            timja Tim Jacomb added a comment -

            I've done some bisecting of the change and found:

            Reverting just this is enough to get it to show up again:

            git checkout 43d9a248fb06a1f84746f6c44e550f8dfa6bd53d core/src/main/resources/lib/form/entry.jelly
            

            Don't have time to continue looking at this now but hopefully that helps

            Show
            timja Tim Jacomb added a comment - I've done some bisecting of the change and found: Reverting just this is enough to get it to show up again: git checkout 43d9a248fb06a1f84746f6c44e550f8dfa6bd53d core/src/main/resources/lib/form/entry.jelly Don't have time to continue looking at this now but hopefully that helps
            Hide
            timja Tim Jacomb added a comment - - edited

            This change is enough to fix it:

            Unable to find source-code formatter for language: diff. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
            diff --git a/core/src/main/resources/lib/form/entry.jelly b/core/src/main/resources/lib/form/entry.jelly
            index c3248dc782..8af3332e80 100644
            --- a/core/src/main/resources/lib/form/entry.jelly
            +++ b/core/src/main/resources/lib/form/entry.jelly
            @@ -72,7 +72,7 @@ THE SOFTWARE.
               <!-- expose this so that we can look up the @field value later from prepareDatabinding.jelly -->
               <j:set var="entry" value="${attrs}" />
               <j:set var="possiblyEscapedTitle" value="${escapeEntryTitleAndDescription ? h.escape(attrs.title) : attrs.title}" />
            -  <div class="jenkins-form-item ${attrs.class}">
            +  <div class='jenkins-form-item tr ${attrs.class}'>
                 <j:choose>
                   <j:when test="${possiblyEscapedTitle!=null}">
                     <div class="jenkins-form-label help-sibling">
            

            But need to find the JS that's breaking as I think it was intentionally removed.

            Show
            timja Tim Jacomb added a comment - - edited This change is enough to fix it: Unable to find source-code formatter for language: diff. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml diff --git a/core/src/main/resources/lib/form/entry.jelly b/core/src/main/resources/lib/form/entry.jelly index c3248dc782..8af3332e80 100644 --- a/core/src/main/resources/lib/form/entry.jelly +++ b/core/src/main/resources/lib/form/entry.jelly @@ -72,7 +72,7 @@ THE SOFTWARE. <!-- expose this so that we can look up the @field value later from prepareDatabinding.jelly --> <j:set var = "entry" value= "${attrs}" /> <j:set var = "possiblyEscapedTitle" value= "${escapeEntryTitleAndDescription ? h.escape(attrs.title) : attrs.title}" /> - <div class= "jenkins-form-item ${attrs.class}" > + <div class= 'jenkins-form-item tr ${attrs.class}' > <j:choose> <j:when test= "${possiblyEscapedTitle!= null }" > <div class= "jenkins-form-label help-sibling" > But need to find the JS that's breaking as I think it was intentionally removed.
            Hide
            timja Tim Jacomb added a comment -
            Show
            timja Tim Jacomb added a comment - It starts failing when `Behaviour.applySubtree(nc,true);` is called in: https://github.com/jenkinsci/jenkins/blob/master/core/src/main/resources/lib/form/repeatable/repeatable.js#L66 Félix Queiruga Balado any ideas?
            Hide
            timja Tim Jacomb added a comment -

            Haven't been able to figure out a way to do it without adding tr back, but should be fine for now

            Show
            timja Tim Jacomb added a comment - Haven't been able to figure out a way to do it without adding tr back, but should be fine for now
            Hide
            fqueiruga Félix Queiruga Balado added a comment -

            I had detected it on the buttons PR but I thought it was introduced there (https://github.com/jenkinsci/jenkins/pull/5897#issuecomment-963985666)

            My first thought was that it could be related to tables-to-divs. I'm looking at https://github.com/jenkinsci/maven-plugin/pull/157/files but I cannot find anything strange though.

            I think adding `.tr` back is a good idea until we can find a good solution for backwards compatibility.

             

            Show
            fqueiruga Félix Queiruga Balado added a comment - I had detected it on the buttons PR but I thought it was introduced there ( https://github.com/jenkinsci/jenkins/pull/5897#issuecomment-963985666) My first thought was that it could be related to tables-to-divs. I'm looking at https://github.com/jenkinsci/maven-plugin/pull/157/files  but I cannot find anything strange though. I think adding `.tr` back is a good idea until we can find a good solution for backwards compatibility.  

              People

              Assignee:
              timja Tim Jacomb
              Reporter:
              basil Basil Crow
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: