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

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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.

            Assignee:
            Unassigned
            Reporter:
            Frédéric Camblor
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: