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

Combobox component broken since 1.480

    XMLWordPrintable

Details

    Description

      Loading the DynamicComboBox from ui-samples-plugin with Jenkins 1.480+ shows a js error when parsing the server output from /fillTitleItems.

      This breaks combobox behaviour and also form submit if the combobox is included in a form.

      Attachments

        Issue Links

          Activity

            vlatombe Vincent Latombe created issue -

            Code changed in jenkins
            User: Vincent Latombe
            Path:
            changelog.html
            core/src/main/java/hudson/util/ComboBoxModel.java
            http://jenkins-ci.org/commit/jenkins/b6ce03878ed7523878ceffdb69e699c19a941bfc
            Log:
            JENKINS-16069 Remove wrapping of JSON with ( )
            now it is done properly on Javascript side so the current server
            implementation triggers javascript errors.

            Result can be observed on DynamicComboBox within ui-samples-plugin

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vincent Latombe Path: changelog.html core/src/main/java/hudson/util/ComboBoxModel.java http://jenkins-ci.org/commit/jenkins/b6ce03878ed7523878ceffdb69e699c19a941bfc Log: JENKINS-16069 Remove wrapping of JSON with ( ) now it is done properly on Javascript side so the current server implementation triggers javascript errors. Result can be observed on DynamicComboBox within ui-samples-plugin

            Code changed in jenkins
            User: Olivier Lamy
            Path:
            changelog.html
            core/src/main/java/hudson/util/ComboBoxModel.java
            http://jenkins-ci.org/commit/jenkins/09fc9f39ee903b09aee155e3b9dee023d0b8efa9
            Log:
            Merge pull request #643 from Vlatombe/JENKINS-16069

            JENKINS-16069 Remove wrapping of JSON with ( )
            Thanks !

            Compare: https://github.com/jenkinsci/jenkins/compare/87e21359fc52...09fc9f39ee90

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: changelog.html core/src/main/java/hudson/util/ComboBoxModel.java http://jenkins-ci.org/commit/jenkins/09fc9f39ee903b09aee155e3b9dee023d0b8efa9 Log: Merge pull request #643 from Vlatombe/ JENKINS-16069 JENKINS-16069 Remove wrapping of JSON with ( ) Thanks ! Compare: https://github.com/jenkinsci/jenkins/compare/87e21359fc52...09fc9f39ee90
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #2130
            JENKINS-16069 Remove wrapping of JSON with ( ) (Revision b6ce03878ed7523878ceffdb69e699c19a941bfc)

            Result = UNSTABLE
            Vincent Latombe : b6ce03878ed7523878ceffdb69e699c19a941bfc
            Files :

            • changelog.html
            • core/src/main/java/hudson/util/ComboBoxModel.java
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #2130 JENKINS-16069 Remove wrapping of JSON with ( ) (Revision b6ce03878ed7523878ceffdb69e699c19a941bfc) Result = UNSTABLE Vincent Latombe : b6ce03878ed7523878ceffdb69e699c19a941bfc Files : changelog.html core/src/main/java/hudson/util/ComboBoxModel.java
            vlatombe Vincent Latombe made changes -
            Field Original Value New Value
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]
            jglick Jesse Glick added a comment - - edited

            Potentially worth backporting to 1.480.x.

            What caused the regression? I am guessing the fix of JENKINS-13541. The fix of this issue simply reverts

            commit 106d95a79f86f81d16ea66a8ea1a33aea9e85773
            Author: kohsuke <kohsuke@71c3de6d-444a-0410-be80-ed276b4c234a>
            Date:   Tue Sep 28 21:11:09 2010 +0000
            
                Prototype.js calls eval() on the response when the content type is set to JavaScript, and eval() fails without the surrounding bracket.
            
            jglick Jesse Glick added a comment - - edited Potentially worth backporting to 1.480.x. What caused the regression? I am guessing the fix of JENKINS-13541 . The fix of this issue simply reverts commit 106d95a79f86f81d16ea66a8ea1a33aea9e85773 Author: kohsuke <kohsuke@71c3de6d-444a-0410-be80-ed276b4c234a> Date: Tue Sep 28 21:11:09 2010 +0000 Prototype.js calls eval() on the response when the content type is set to JavaScript, and eval() fails without the surrounding bracket.
            jglick Jesse Glick made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            jglick Jesse Glick made changes -
            Link This issue is blocking JENKINS-13541 [ JENKINS-13541 ]

            I don't exactly know where the regression took place. Probably in the process of componentization that took place back in 1.480 something changed on the javascript side of json parsing.

            vlatombe Vincent Latombe added a comment - I don't exactly know where the regression took place. Probably in the process of componentization that took place back in 1.480 something changed on the javascript side of json parsing.
            jglick Jesse Glick added a comment -

            @vlatombe my guess is that JENKINS-13541 was the cause; this was in 1.471. Have not yet bisected to be sure.

            jglick Jesse Glick added a comment - @vlatombe my guess is that JENKINS-13541 was the cause; this was in 1.471. Have not yet bisected to be sure.

            Code changed in jenkins
            User: Vincent Latombe
            Path:
            changelog.html
            core/src/main/java/hudson/util/ComboBoxModel.java
            http://jenkins-ci.org/commit/jenkins/580e7de701c923e5c97f94513f8672bf292e4972
            Log:
            JENKINS-16069 Remove wrapping of JSON with ( )
            now it is done properly on Javascript side so the current server
            implementation triggers javascript errors.

            Result can be observed on DynamicComboBox within ui-samples-plugin(cherry picked from commit b6ce03878ed7523878ceffdb69e699c19a941bfc)

            Conflicts:
            changelog.html

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vincent Latombe Path: changelog.html core/src/main/java/hudson/util/ComboBoxModel.java http://jenkins-ci.org/commit/jenkins/580e7de701c923e5c97f94513f8672bf292e4972 Log: JENKINS-16069 Remove wrapping of JSON with ( ) now it is done properly on Javascript side so the current server implementation triggers javascript errors. Result can be observed on DynamicComboBox within ui-samples-plugin(cherry picked from commit b6ce03878ed7523878ceffdb69e699c19a941bfc) Conflicts: changelog.html
            jglick Jesse Glick made changes -
            Labels 1.480.3-fixed
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 146872 ] JNJira + In-Review [ 192123 ]

            People

              Unassigned Unassigned
              vlatombe Vincent Latombe
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: