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

<st:bind> seems to include json2.js, but not everytime

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • core
    • None
    • Jenkins 1.523

      When installing SCM-Sync-Configuration plugin v0.0.7.2 on 1.523, it seems like this line of code :

      var plugin = <st:bind value="${it}"/>;
      

      is sometimes (depending on Jenkins installations) generating a strange output in the HTML :

      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']);
      

      Whereas in 1.509.2, I have this generated output :

      var plugin = makeStaplerProxy('/$stapler/bound/<some-token>','<another token>',['purgeScmSyncConfigLogs']);
      

      I personnally don't reproduce it on a fresh 1.523 install, but Björn Pedersen is reproducing it on its instance.

      Is there something bad :

      • In my code (I shouldn't affect the call to <st:bind> to a js variable because it could potentially has to include necessary third party js files like json2.js)
        => if this is the case, is there a workaround to proxify my plugin instance on the JS clientside world ? (other than having to do stuff by hand by sending manual Ajax calls to the server side)
      • In Björn Pedersen's installation, or Jenkins core ?

      Side note : Seems like the source of the problem is located in this commit which loads json2.js if it isn't already loaded.

            Unassigned Unassigned
            fcamblor Frédéric Camblor
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: