• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • scm-sync-configuration v0.0.7.2

      Wrong binding for the 'remove logs' footer button.

      The result is a JS-Error:

      Timestamp: 22.07.2013 15:11:09
      Error: SyntaxError: syntax error
      Source File: http://...../jenkins/
      Line: 355, Column: 25
      Source Code:
      var plugin = <script src='/jenkins/adjuncts/9f64aaa1/org/kohsuke/stapler/

      and the output of the script as plain text.

          [JENKINS-18867] Wrong binding for the remove logs button

          Could your please provide :

          • Your jenkins version
          • Your browser version

          Frédéric Camblor added a comment - Could your please provide : Your jenkins version Your browser version

          Firefox 22
          Jenkins 1.523

          Björn Pedersen added a comment - Firefox 22 Jenkins 1.523

          Frédéric Camblor added a comment - - edited

          I just downloaded 1.523 and cannot reproduce your issue

          In the html page, I have :

                  function removeLog() {
                      var plugin = makeStaplerProxy('/$stapler/bound/445063c5-e7f0-4900-bf56-666d02720240','bc2fe9c2-6963-46ba-bf58-6dbcd40eb78d',['purgeScmSyncConfigLogs']);
                      plugin.purgeScmSyncConfigLogs();
                      alert("SCM Sync Config errors purged ! You can refresh the page.");
                  }
          

          Frédéric Camblor added a comment - - edited I just downloaded 1.523 and cannot reproduce your issue In the html page, I have : function removeLog() { var plugin = makeStaplerProxy( '/$stapler/bound/445063c5-e7f0-4900-bf56-666d02720240' , 'bc2fe9c2-6963-46ba-bf58-6dbcd40eb78d' ,[ 'purgeScmSyncConfigLogs' ]); plugin.purgeScmSyncConfigLogs(); alert( "SCM Sync Config errors purged ! You can refresh the page." ); }

          Here I have (this time with google-chrome):
          {{
          <script type="text/javascript">
          function removeLog()

          { alert("Only administrators can purge logs !"); return; var plugin = <script src='/jenkins/adjuncts/9f64aaa1/org/kohsuke/stapler/json2.js' type='text/javascript'></script>makeStaplerProxy('/jenkins/$stapler/bound/47f87312-880f-40fc-9a12-0a75149deedc','xxxxxxxxxxxxxxxxxx',['purgeScmSyncConfigLogs']); plugin.purgeScmSyncConfigLogs(); alert("SCM Sync Config errors purged ! You can refresh the page."); }

          </script>
          }}

          Björn Pedersen added a comment - Here I have (this time with google-chrome): {{ <script type="text/javascript"> function removeLog() { alert("Only administrators can purge logs !"); return; var plugin = <script src='/jenkins/adjuncts/9f64aaa1/org/kohsuke/stapler/json2.js' type='text/javascript'></script>makeStaplerProxy('/jenkins/$stapler/bound/47f87312-880f-40fc-9a12-0a75149deedc','xxxxxxxxxxxxxxxxxx',['purgeScmSyncConfigLogs']); plugin.purgeScmSyncConfigLogs(); alert("SCM Sync Config errors purged ! You can refresh the page."); } </script> }}

          Frédéric Camblor added a comment - - edited

          I don't reproduce your issue on 1.509.2 (latest LTS) either.

          I just raised JENKINS-18875 because it doesn't seem to be related to the plugin
          You can track this issue to have feedback about your problem

          Frédéric Camblor added a comment - - edited I don't reproduce your issue on 1.509.2 (latest LTS) either. I just raised JENKINS-18875 because it doesn't seem to be related to the plugin You can track this issue to have feedback about your problem

          Frédéric Camblor added a comment - - edited

          Attached a dedicated hpi which should fix the problem.

          Could you install it and see if it solves your problem (I cannot reproduce the problem on my instance) ?

          Frédéric Camblor added a comment - - edited Attached a dedicated hpi which should fix the problem. Could you install it and see if it solves your problem (I cannot reproduce the problem on my instance) ?

          Yes this version is fixing the problem. As I've seen it is mainly a problem of the jquery plugin changing the behaviuor of st:bind, correct?

          Björn Pedersen added a comment - Yes this version is fixing the problem. As I've seen it is mainly a problem of the jquery plugin changing the behaviuor of st:bind, correct?

          Yep, there is a "Jquery plugin" which is generally pulled by another plugin, and which should alter the st:bind behaviour.

          You have it and I don't

          Will try to release a new version 0.0.7.3 when I'll have a little time.

          Frédéric Camblor added a comment - Yep, there is a "Jquery plugin" which is generally pulled by another plugin, and which should alter the st:bind behaviour. You have it and I don't Will try to release a new version 0.0.7.3 when I'll have a little time.

          Code changed in jenkins
          User: fcamblor
          Path:
          src/main/resources/hudson/plugins/scm_sync_configuration/extensions/ScmSyncConfigurationPageDecorator/footer.jelly
          http://jenkins-ci.org/commit/scm-sync-configuration-plugin/ce82b4b6c4b7e751f325a3206cf6eb621d5d5e87
          Log:
          fix for JENKINS-18867 : when jquery is already loaded by another plugin, st:bind call was producing js syntax error

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: fcamblor Path: src/main/resources/hudson/plugins/scm_sync_configuration/extensions/ScmSyncConfigurationPageDecorator/footer.jelly http://jenkins-ci.org/commit/scm-sync-configuration-plugin/ce82b4b6c4b7e751f325a3206cf6eb621d5d5e87 Log: fix for JENKINS-18867 : when jquery is already loaded by another plugin, st:bind call was producing js syntax error

          Code changed in jenkins
          User: Nalin Makar
          Path:
          README
          src/main/resources/hudson/plugins/testng/results/PackageResult/reportDetail.groovy
          http://jenkins-ci.org/commit/testng-plugin-plugin/4767eb1660876a2d8498429e2e8220c3df87ff23
          Log:
          Fixed JENKINS-19157 - Make st:bind work when Jenkins has jQuery plugin installed

          See JENKINS-18867 and JENKINS-18875 for more context

          Testing: unit tests continue to pass. unable to reproduce this locally

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nalin Makar Path: README src/main/resources/hudson/plugins/testng/results/PackageResult/reportDetail.groovy http://jenkins-ci.org/commit/testng-plugin-plugin/4767eb1660876a2d8498429e2e8220c3df87ff23 Log: Fixed JENKINS-19157 - Make st:bind work when Jenkins has jQuery plugin installed See JENKINS-18867 and JENKINS-18875 for more context Testing: unit tests continue to pass. unable to reproduce this locally

            fcamblor Frédéric Camblor
            pedersen Björn Pedersen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: