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

Error: TypeError: e.up(...).on is not a function on job-configuration screen, which never finishes loading/has broken Save button

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core

      We upgraded just this morning to version 1.521, and when going into the job-configuration page, the following two things happen:

      1) the "Save" button isn't correctly styled (it's small) and throws an error on click
      2) we see the Configuration-Loading overlay, and see this in the Error Console:

      Timestamp: 7/2/2013 12:52:16 PM
      Error: TypeError: e.up(...).on is not a function
      Source File: http://qa-selenium-stage.mv.mozilla.com:8080/adjuncts/562581b0/lib/form/textarea/textarea.js
      Line: 18

          [JENKINS-18585] Error: TypeError: e.up(...).on is not a function on job-configuration screen, which never finishes loading/has broken Save button

          It would be nice to have a corresponding entry in the changelog as well.

          Björn Pedersen added a comment - It would be nice to have a corresponding entry in the changelog as well.

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/src/main/resources/lib/form/textarea/textarea.js
          http://jenkins-ci.org/commit/jenkins/059e6081d0be21a3a92d705c43c9e1f658347797
          Log:
          [FIXED JENKINS-18585]

          The earlier fix by @ssogabe broke the test. This fix corrects the
          problem properly.

          The reason this error happens with some plugins is that if there's an
          input field whose name is "on", then even after prototype.js extends
          an element object, "form.on" will refer to the input element, not the
          prototype.js function to add an event handler.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/resources/lib/form/textarea/textarea.js http://jenkins-ci.org/commit/jenkins/059e6081d0be21a3a92d705c43c9e1f658347797 Log: [FIXED JENKINS-18585] The earlier fix by @ssogabe broke the test. This fix corrects the problem properly. The reason this error happens with some plugins is that if there's an input field whose name is "on", then even after prototype.js extends an element object, "form.on" will refer to the input element, not the prototype.js function to add an event handler.

          dogfood added a comment -

          Integrated in jenkins_main_trunk #2693
          [FIXED JENKINS-18585] (Revision 059e6081d0be21a3a92d705c43c9e1f658347797)

          Result = UNSTABLE
          kohsuke : 059e6081d0be21a3a92d705c43c9e1f658347797
          Files :

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

          dogfood added a comment - Integrated in jenkins_main_trunk #2693 [FIXED JENKINS-18585] (Revision 059e6081d0be21a3a92d705c43c9e1f658347797) Result = UNSTABLE kohsuke : 059e6081d0be21a3a92d705c43c9e1f658347797 Files : core/src/main/resources/lib/form/textarea/textarea.js changelog.html

          I still see this bug in Jenkins 1.522 when using the Plot Plugin.

          Jan Darmochwal added a comment - I still see this bug in Jenkins 1.522 when using the Plot Plugin .

          sogabe added a comment -

          @Jan Did you get a javascript error "Error: TypeError: ...." ?

          sogabe added a comment - @Jan Did you get a javascript error "Error: TypeError: ...." ?

          Hi, I am also using the plot plugin and got the same issue even with 1.522 (1.520 is the last one working). I am using Firefox (latest). Could it be that e.up is still not returning any value (at least that is what my short debugging showed). After digging up this site here http://www.redmine.org/issues/1636 maybe e.up should be replaced with Element.up(e, 'form'). Maybe someone with a development setup could try this out. I need to get it all set up first before I can try myself.

          Andre Winkelmann added a comment - Hi, I am also using the plot plugin and got the same issue even with 1.522 (1.520 is the last one working). I am using Firefox (latest). Could it be that e.up is still not returning any value (at least that is what my short debugging showed). After digging up this site here http://www.redmine.org/issues/1636 maybe e.up should be replaced with Element.up(e, 'form'). Maybe someone with a development setup could try this out. I need to get it all set up first before I can try myself.

          @sogabe I get a "TypeError: registry is undefined @ jenkins/static/4151f6af/scripts/prototype.js:5621" !

          Jan Darmochwal added a comment - @sogabe I get a "TypeError: registry is undefined @ jenkins/static/4151f6af/scripts/prototype.js:5621" !

          Russell B added a comment - - edited

          [ linked issue JENKINS-18644 ]

          Russell B added a comment - - edited [ linked issue JENKINS-18644 ]

          sogabe added a comment - - edited

          @Jan see JENKINS-18674

          sogabe added a comment - - edited @Jan see JENKINS-18674

          Russell B added a comment -

          Andre, I came across that detail, as well. I tried your idea for Element.up(e,'form'), but the issue remained. Wrapping those three lines with an if(e.up('form'))

          { ... }

          resolves the issue with Plot Plugin, but this does not address root cause, so I am not sure if it is an appropriate fix?

          Russell B added a comment - Andre, I came across that detail, as well. I tried your idea for Element.up(e,'form'), but the issue remained. Wrapping those three lines with an if(e.up('form')) { ... } resolves the issue with Plot Plugin, but this does not address root cause, so I am not sure if it is an appropriate fix?

            Unassigned Unassigned
            stephendonner Stephen Donner
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: