-
Bug
-
Resolution: Fixed
-
Major
-
Jenkins 2.407 running on Windows Server 2019
-
-
2.410
When configuring a free style job with the "Plublish to confluence" build step today we got an error.
The JS console prints errors like
The interessting error is
Legacy checkUrl ''descriptorByName/ConfluencePublisher/pageNameCheck?siteName='+Form.findMatchingInput(this,'siteName').value+'&spaceName='+Form.findMatchingInput(this,'_.spaceName').value+'&pageName='+escape(this.value)' is not valid JavaScript: TypeError: Form.findMatchingInput(...) is undefined
This points direcly to a recent change replacing Form.findMatchingInput from prototype.js with a pure JS function: https://github.com/jenkinsci/jenkins/pull/8008/
After some more investigation it seems to me that the change in the pull request is not a pure replacement.
The old function called Form.getInputs which returns input, textarea and select elements. The new function replaced it by only looking for input elements (see: https://github.com/jenkinsci/jenkins/pull/8008/files#diff-10922aee3260853be495a09cf3bf13bf5f931bc128e334807e3008ff00b57651L2266)
This causes the call to Form.findMatchingInput(this,'siteName') to return undefinded as "siteName" is a select not an input.
I also tested the behavior with a new installation of 2.405 and 2.406 via docker. 2.405 works, whereas 2.406 does not.
- links to
[JENKINS-71383] Confluence Publisher plugin space check not working (regression in 2.406)
Attachment | Original: js_output_job_config_warnings.png [ 60532 ] |
Attachment | New: js_output_job_config_warnings.png [ 60534 ] |
Description |
Original:
When configuring a free style job with the "Plublish to confluence" build step today we got an error.
!job_config_confluence_publisher_error.png|width=471,height=216! The JS console prints errors like !js_output_job_config_warnings.png! The interessing error is {code:java} Legacy checkUrl ''descriptorByName/ConfluencePublisher/pageNameCheck?siteName='Form.findMatchingInput(this,'siteName').value'&spaceName='Form.findMatchingInput(this,'_.spaceName').value'&pageName='+escape(this.value)' is not valid JavaScript: TypeError: Form.findMatchingInput(...) is undefined {code} This points direcly to a recent change replacing Form.findMatchingInput from prototype.js with a pure JS function: [https://github.com/jenkinsci/jenkins/pull/8008/] After some more investigation it seems to me that the change in the pull request is not a pure replacement. The old function called Form.getInputs which returns input, textarea and select elements. The new function replaced it by only looking for input elements (see: [https://github.com/jenkinsci/jenkins/pull/8008/files#diff-10922aee3260853be495a09cf3bf13bf5f931bc128e334807e3008ff00b57651L2266)] This causes the call to Form.findMatchingInput(this,'siteName') to return undefinded as "siteName" is a select not an input. I also tested the behavior with a new installation of 2.405 and 2.406 via docker. 2.405 works, whereas 2.406 does not. |
New:
When configuring a free style job with the "Plublish to confluence" build step today we got an error.
!job_config_confluence_publisher_error.png|width=471,height=216! The JS console prints errors like !js_output_job_config_warnings.png|thumbnail! The interessing error is {code:java} Legacy checkUrl ''descriptorByName/ConfluencePublisher/pageNameCheck?siteName='Form.findMatchingInput(this,'siteName').value'&spaceName='Form.findMatchingInput(this,'_.spaceName').value'&pageName='+escape(this.value)' is not valid JavaScript: TypeError: Form.findMatchingInput(...) is undefined {code} This points direcly to a recent change replacing Form.findMatchingInput from prototype.js with a pure JS function: [https://github.com/jenkinsci/jenkins/pull/8008/] After some more investigation it seems to me that the change in the pull request is not a pure replacement. The old function called Form.getInputs which returns input, textarea and select elements. The new function replaced it by only looking for input elements (see: [https://github.com/jenkinsci/jenkins/pull/8008/files#diff-10922aee3260853be495a09cf3bf13bf5f931bc128e334807e3008ff00b57651L2266)] This causes the call to Form.findMatchingInput(this,'siteName') to return undefinded as "siteName" is a select not an input. I also tested the behavior with a new installation of 2.405 and 2.406 via docker. 2.405 works, whereas 2.406 does not. |
Description |
Original:
When configuring a free style job with the "Plublish to confluence" build step today we got an error.
!job_config_confluence_publisher_error.png|width=471,height=216! The JS console prints errors like !js_output_job_config_warnings.png|thumbnail! The interessing error is {code:java} Legacy checkUrl ''descriptorByName/ConfluencePublisher/pageNameCheck?siteName='Form.findMatchingInput(this,'siteName').value'&spaceName='Form.findMatchingInput(this,'_.spaceName').value'&pageName='+escape(this.value)' is not valid JavaScript: TypeError: Form.findMatchingInput(...) is undefined {code} This points direcly to a recent change replacing Form.findMatchingInput from prototype.js with a pure JS function: [https://github.com/jenkinsci/jenkins/pull/8008/] After some more investigation it seems to me that the change in the pull request is not a pure replacement. The old function called Form.getInputs which returns input, textarea and select elements. The new function replaced it by only looking for input elements (see: [https://github.com/jenkinsci/jenkins/pull/8008/files#diff-10922aee3260853be495a09cf3bf13bf5f931bc128e334807e3008ff00b57651L2266)] This causes the call to Form.findMatchingInput(this,'siteName') to return undefinded as "siteName" is a select not an input. I also tested the behavior with a new installation of 2.405 and 2.406 via docker. 2.405 works, whereas 2.406 does not. |
New:
When configuring a free style job with the "Plublish to confluence" build step today we got an error.
!job_config_confluence_publisher_error.png|width=471,height=216! The JS console prints errors like !js_output_job_config_warnings.png|width=890,height=89,thumbnail! The interessing error is {code:java} Legacy checkUrl ''descriptorByName/ConfluencePublisher/pageNameCheck?siteName='Form.findMatchingInput(this,'siteName').value'&spaceName='Form.findMatchingInput(this,'_.spaceName').value'&pageName='+escape(this.value)' is not valid JavaScript: TypeError: Form.findMatchingInput(...) is undefined {code} This points direcly to a recent change replacing Form.findMatchingInput from prototype.js with a pure JS function: [https://github.com/jenkinsci/jenkins/pull/8008/] After some more investigation it seems to me that the change in the pull request is not a pure replacement. The old function called Form.getInputs which returns input, textarea and select elements. The new function replaced it by only looking for input elements (see: [https://github.com/jenkinsci/jenkins/pull/8008/files#diff-10922aee3260853be495a09cf3bf13bf5f931bc128e334807e3008ff00b57651L2266)] This causes the call to Form.findMatchingInput(this,'siteName') to return undefinded as "siteName" is a select not an input. I also tested the behavior with a new installation of 2.405 and 2.406 via docker. 2.405 works, whereas 2.406 does not. |
Description |
Original:
When configuring a free style job with the "Plublish to confluence" build step today we got an error.
!job_config_confluence_publisher_error.png|width=471,height=216! The JS console prints errors like !js_output_job_config_warnings.png|width=890,height=89,thumbnail! The interessing error is {code:java} Legacy checkUrl ''descriptorByName/ConfluencePublisher/pageNameCheck?siteName='Form.findMatchingInput(this,'siteName').value'&spaceName='Form.findMatchingInput(this,'_.spaceName').value'&pageName='+escape(this.value)' is not valid JavaScript: TypeError: Form.findMatchingInput(...) is undefined {code} This points direcly to a recent change replacing Form.findMatchingInput from prototype.js with a pure JS function: [https://github.com/jenkinsci/jenkins/pull/8008/] After some more investigation it seems to me that the change in the pull request is not a pure replacement. The old function called Form.getInputs which returns input, textarea and select elements. The new function replaced it by only looking for input elements (see: [https://github.com/jenkinsci/jenkins/pull/8008/files#diff-10922aee3260853be495a09cf3bf13bf5f931bc128e334807e3008ff00b57651L2266)] This causes the call to Form.findMatchingInput(this,'siteName') to return undefinded as "siteName" is a select not an input. I also tested the behavior with a new installation of 2.405 and 2.406 via docker. 2.405 works, whereas 2.406 does not. |
New:
When configuring a free style job with the "Plublish to confluence" build step today we got an error.
!job_config_confluence_publisher_error.png|width=471,height=216! The JS console prints errors like !js_output_job_config_warnings.png! The interessing error is {code:java} Legacy checkUrl ''descriptorByName/ConfluencePublisher/pageNameCheck?siteName='Form.findMatchingInput(this,'siteName').value'&spaceName='Form.findMatchingInput(this,'_.spaceName').value'&pageName='+escape(this.value)' is not valid JavaScript: TypeError: Form.findMatchingInput(...) is undefined {code} This points direcly to a recent change replacing Form.findMatchingInput from prototype.js with a pure JS function: [https://github.com/jenkinsci/jenkins/pull/8008/] After some more investigation it seems to me that the change in the pull request is not a pure replacement. The old function called Form.getInputs which returns input, textarea and select elements. The new function replaced it by only looking for input elements (see: [https://github.com/jenkinsci/jenkins/pull/8008/files#diff-10922aee3260853be495a09cf3bf13bf5f931bc128e334807e3008ff00b57651L2266)] This causes the call to Form.findMatchingInput(this,'siteName') to return undefinded as "siteName" is a select not an input. I also tested the behavior with a new installation of 2.405 and 2.406 via docker. 2.405 works, whereas 2.406 does not. |
Description |
Original:
When configuring a free style job with the "Plublish to confluence" build step today we got an error.
!job_config_confluence_publisher_error.png|width=471,height=216! The JS console prints errors like !js_output_job_config_warnings.png! The interessing error is {code:java} Legacy checkUrl ''descriptorByName/ConfluencePublisher/pageNameCheck?siteName='Form.findMatchingInput(this,'siteName').value'&spaceName='Form.findMatchingInput(this,'_.spaceName').value'&pageName='+escape(this.value)' is not valid JavaScript: TypeError: Form.findMatchingInput(...) is undefined {code} This points direcly to a recent change replacing Form.findMatchingInput from prototype.js with a pure JS function: [https://github.com/jenkinsci/jenkins/pull/8008/] After some more investigation it seems to me that the change in the pull request is not a pure replacement. The old function called Form.getInputs which returns input, textarea and select elements. The new function replaced it by only looking for input elements (see: [https://github.com/jenkinsci/jenkins/pull/8008/files#diff-10922aee3260853be495a09cf3bf13bf5f931bc128e334807e3008ff00b57651L2266)] This causes the call to Form.findMatchingInput(this,'siteName') to return undefinded as "siteName" is a select not an input. I also tested the behavior with a new installation of 2.405 and 2.406 via docker. 2.405 works, whereas 2.406 does not. |
New:
When configuring a free style job with the "Plublish to confluence" build step today we got an error.
!job_config_confluence_publisher_error.png|width=471,height=216! The JS console prints errors like !js_output_job_config_warnings.png! The interessing error is {noformat} Legacy checkUrl ''descriptorByName/ConfluencePublisher/pageNameCheck?siteName='+Form.findMatchingInput(this,'siteName').value+'&spaceName='+Form.findMatchingInput(this,'_.spaceName').value+'&pageName='+escape(this.value)' is not valid JavaScript: TypeError: Form.findMatchingInput(...) is undefined {noformat} This points direcly to a recent change replacing Form.findMatchingInput from prototype.js with a pure JS function: [https://github.com/jenkinsci/jenkins/pull/8008/] After some more investigation it seems to me that the change in the pull request is not a pure replacement. The old function called Form.getInputs which returns input, textarea and select elements. The new function replaced it by only looking for input elements (see: [https://github.com/jenkinsci/jenkins/pull/8008/files#diff-10922aee3260853be495a09cf3bf13bf5f931bc128e334807e3008ff00b57651L2266)] This causes the call to Form.findMatchingInput(this,'siteName') to return undefinded as "siteName" is a select not an input. I also tested the behavior with a new installation of 2.405 and 2.406 via docker. 2.405 works, whereas 2.406 does not. |
Remote Link | New: Dieser Vorgang ist mit "PR Deprecate Form.findMatchingInput (Webverknüpfung)" verknüpft [ 28730 ] |
Attachment | Original: js_output_job_config_warnings.png [ 60534 ] |
Attachment | New: image-2023-06-02-09-09-37-176.png [ 60535 ] |