• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • IE8..10 Compatibility View
      build-timeout-1.11
      Jenkins version: 1.480.3, 1.509.2, 1.509.3

      Issue causes error after clicking on "Apply button" in Job's configuration (in IE with CompatView). Browser opens an empty new page, previous page shows an empty error box. BTW, "save" button works well..

      Examples of erroneous requests:

      • "/job/MY_JOB/descriptorByName/hudson.plugins.build_timeout.BuildTimeoutWrapper/fillTimeoutPercentageItems"
      • "/job/MY_JOB_2/descriptorByName/com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper/fillUserItems"
      • ...

      Exception message: Invalid argument

          [JENKINS-19826] Apply button does not work in IE Compat View

          Oleg Nenashev added a comment -

          Callstack:

          dispatchException (hudson-behavior.js:2195)
          respondToReadyState (prototype.js:1659) // readystate=4; response text is filled correctly, but response.headerJSON is null
          onStateChange (prototype.js:1600)
          Anonymous function (prototype.js:414)

          Oleg Nenashev added a comment - Callstack: dispatchException (hudson-behavior.js:2195) respondToReadyState (prototype.js:1659) // readystate=4; response text is filled correctly, but response.headerJSON is null onStateChange (prototype.js:1600) Anonymous function (prototype.js:414)

          Oleg Nenashev added a comment -

          Issue seems to be caused by errors handling in Compat View. Error in Chrome is not related.

          Workaround 1: Don't use Compat View

          Proposal: Add X-UA-Compatible stub to generated HTML pages:

          <meta http-equiv="X-UA-Compatible" content="IE=11; IE=10; IE=9; IE=8; IE=7; IE=EDGE" />
          

          Sources:
          [1]: http://msdn.microsoft.com/en-us/library/ms533876%28VS.85%29.aspx
          [2]: http://twigstechtips.blogspot.ru/2010/03/css-ie8-meta-tag-to-disable.html

          Oleg Nenashev added a comment - Issue seems to be caused by errors handling in Compat View. Error in Chrome is not related. Workaround 1: Don't use Compat View Proposal: Add X-UA-Compatible stub to generated HTML pages: <meta http-equiv= "X-UA-Compatible" content= "IE=11; IE=10; IE=9; IE=8; IE=7; IE=EDGE" /> Sources: [1] : http://msdn.microsoft.com/en-us/library/ms533876%28VS.85%29.aspx [2] : http://twigstechtips.blogspot.ru/2010/03/css-ie8-meta-tag-to-disable.html

          Oleg Nenashev added a comment -

          Seems that issue is related to fillXXXItems() from f:select only

          Oleg Nenashev added a comment - Seems that issue is related to fillXXXItems() from f:select only

          can you give 1.12 a try ?
          I can't reproduce this error with 1.509/1.12 on Chrome (don't have IE to test)

          Nicolas De Loof added a comment - can you give 1.12 a try ? I can't reproduce this error with 1.509/1.12 on Chrome (don't have IE to test)

          Oleg Nenashev added a comment -

          Hello Nicolas,

          I suppose that there's no bug in build-timeout. I've experienced such error in several other places, which use fillItems() for selects.

          https://github.com/jenkinsci/build-timeout-plugin/pull/16 resolves issue for build-timeout, but it does not help in general. I'll resubmit bug to the core.

          BR, Oleg

          Oleg Nenashev added a comment - Hello Nicolas, I suppose that there's no bug in build-timeout. I've experienced such error in several other places, which use fillItems() for selects. https://github.com/jenkinsci/build-timeout-plugin/pull/16 resolves issue for build-timeout, but it does not help in general. I'll resubmit bug to the core. BR, Oleg

          Oleg Nenashev added a comment -

          Updated description

          Oleg Nenashev added a comment - Updated description

          Jesse Glick added a comment -

          While I can reproduce this error, I have made no headway in diagnosing it. Cannot even find how to convince IE to show the original callstack.

          Is the problem just that we have an obsolete version of Prototype that does not support all IE versions?

          Setting X-UA-Compatible seems like a workaround, not a fix.

          Jesse Glick added a comment - While I can reproduce this error, I have made no headway in diagnosing it. Cannot even find how to convince IE to show the original callstack. Is the problem just that we have an obsolete version of Prototype that does not support all IE versions? Setting X-UA-Compatible seems like a workaround, not a fix.

          Oleg Nenashev added a comment -

          Probably yes, but the issue can be reproduced in 1.480.3/IE8 Compat View as well. Hence it should be a quite old regression issue.
          On the other hand many people have to use IE, so it is very strange that it has not been reproduced/submitted before.
          It is also strange that IE goes to Compat View by default.

          My JavaScript skills are close to zero, but I can perform addition testing if required.

          Oleg Nenashev added a comment - Probably yes, but the issue can be reproduced in 1.480.3/IE8 Compat View as well. Hence it should be a quite old regression issue. On the other hand many people have to use IE, so it is very strange that it has not been reproduced/submitted before. It is also strange that IE goes to Compat View by default. My JavaScript skills are close to zero, but I can perform addition testing if required.

          Jesse Glick added a comment -

          My JavaScript is also weak. I am hoping to find someone who would be able to investigate this properly, maybe also providing a proper fix of JENKINS-19171.

          Jesse Glick added a comment - My JavaScript is also weak. I am hoping to find someone who would be able to investigate this properly, maybe also providing a proper fix of JENKINS-19171 .

          Jesse Glick added a comment -

          During page load I am getting SCRIPT87: Invalid argument. from hudson-behavior.js:397:

          return element.fireEvent('on'+event,evt)
          

          for an event of filled. Catching this error (and returning false) does not suffice to make the Apply button work, but I cannot find any new error printed at that time, so that may be a red herring. Possibly related to JENKINS-20772.

          Jesse Glick added a comment - During page load I am getting SCRIPT87: Invalid argument. from hudson-behavior.js:397 : return element.fireEvent( 'on' +event,evt) for an event of filled . Catching this error (and returning false ) does not suffice to make the Apply button work, but I cannot find any new error printed at that time, so that may be a red herring. Possibly related to JENKINS-20772 .

          Jesse Glick added a comment -

          So the response body from configSubmit is correct (supposed to show Saved in the notification bar). But in apply.js, the iframe has no content. Unclear whether this is actually related to the JS errors thrown earlier.

          Jesse Glick added a comment - So the response body from configSubmit is correct (supposed to show Saved in the notification bar). But in apply.js , the iframe has no content. Unclear whether this is actually related to the JS errors thrown earlier.

          Jesse Glick added a comment -

          Jesse Glick added a comment - http://stackoverflow.com/questions/2181385/ie-issue-submitting-form-to-an-iframe-using-javascript seems to be the explanation.

          Jesse Glick added a comment -

          I see no evidence that the JS errors were in any way related to the problem with the Apply button. Maybe they should be fixed somehow, but I do not know what their cause is, or what the impact is.

          Testing on IE 9.

          Jesse Glick added a comment - I see no evidence that the JS errors were in any way related to the problem with the Apply button. Maybe they should be fixed somehow, but I do not know what their cause is, or what the impact is. Testing on IE 9.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          changelog.html
          core/src/main/resources/lib/form/apply/apply.js
          http://jenkins-ci.org/commit/jenkins/dda099c19a7a015d9c2fc655754dbb07b1b39455
          Log:
          [FIXED JENKINS-19826] element.setAttribute('name', …) does not work in IE in compatibility mode, so use prototype’s Element(…) which does.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/resources/lib/form/apply/apply.js http://jenkins-ci.org/commit/jenkins/dda099c19a7a015d9c2fc655754dbb07b1b39455 Log: [FIXED JENKINS-19826] element.setAttribute('name', …) does not work in IE in compatibility mode, so use prototype’s Element(…) which does.

          Oleg Nenashev added a comment -

          Thanks a lot for the fix

          Oleg Nenashev added a comment - Thanks a lot for the fix

          Jesse Glick added a comment -

          @oleg_nenashev sure; please help verify in any way you can.

          Jesse Glick added a comment - @oleg_nenashev sure; please help verify in any way you can.

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3153
          [FIXED JENKINS-19826] element.setAttribute('name', …) does not work in IE in compatibility mode, so use prototype’s Element(…) which does. (Revision dda099c19a7a015d9c2fc655754dbb07b1b39455)

          Result = SUCCESS
          Jesse Glick : dda099c19a7a015d9c2fc655754dbb07b1b39455
          Files :

          • core/src/main/resources/lib/form/apply/apply.js
          • changelog.html

          dogfood added a comment - Integrated in jenkins_main_trunk #3153 [FIXED JENKINS-19826] element.setAttribute('name', …) does not work in IE in compatibility mode, so use prototype’s Element(…) which does. (Revision dda099c19a7a015d9c2fc655754dbb07b1b39455) Result = SUCCESS Jesse Glick : dda099c19a7a015d9c2fc655754dbb07b1b39455 Files : core/src/main/resources/lib/form/apply/apply.js changelog.html

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/resources/lib/form/apply/apply.js
          http://jenkins-ci.org/commit/jenkins/eca76d7700231a83db3db98d43e570670f48fc23
          Log:
          [FIXED JENKINS-19826] element.setAttribute('name', …) does not work in IE in compatibility mode, so use prototype’s Element(…) which does.

          (cherry picked from commit dda099c19a7a015d9c2fc655754dbb07b1b39455)

          Conflicts:
          changelog.html

          Compare: https://github.com/jenkinsci/jenkins/compare/14214d9b2785...eca76d770023

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/resources/lib/form/apply/apply.js http://jenkins-ci.org/commit/jenkins/eca76d7700231a83db3db98d43e570670f48fc23 Log: [FIXED JENKINS-19826] element.setAttribute('name', …) does not work in IE in compatibility mode, so use prototype’s Element(…) which does. (cherry picked from commit dda099c19a7a015d9c2fc655754dbb07b1b39455) Conflicts: changelog.html Compare: https://github.com/jenkinsci/jenkins/compare/14214d9b2785...eca76d770023

            oleg_nenashev Oleg Nenashev
            oleg_nenashev Oleg Nenashev
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: