timja / jenkins-gh-issues-poc-06-18

0 stars 0 forks source link

[JENKINS-36767] Property hudson.script.noCache breaks the New Item page #3357

Open timja opened 8 years ago

timja commented 8 years ago

Javascript fails to load properly when hudson.script.noCache=true, New Item page is unusable.


Originally reported by kzantow, imported from: Property hudson.script.noCache breaks the New Item page
  • status: Open
  • priority: Major
  • resolution: Unresolved
  • imported: 2022/01/10
timja commented 8 years ago

abayer:

Apparently the Pipeline script textbox also fails to load.

timja commented 8 years ago

abayer:

I take that back - it looks like it's a different issue entirely. Yaaay.

timja commented 8 years ago

rodrigoqueiro:

It looks like this occurs because noCache sets the resource URL to "" (normally "/static/SESSION_HASH") which confuses jenkins-js-modules' getRootURL(). It's already been fixed upstream here: https://github.com/jenkinsci/js-modules/commit/4599871e17f78b6da22a013fac878dd8fc156b4d

But jenkins-js-modules hasn't been released since March: https://www.npmjs.com/package/jenkins-js-modules

I couldn't work out how to make npm use the latest source from GitHub, but when I updated war/node_modules/jenkins-js-modules/js/internal.js to check against null/undefined instead of checking for truthiness, it resolved the issue.

timja commented 7 years ago

danielbeck:

tfennelly Could you release js-modules with the change mentioned above?