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

Confluence Publisher plugin space check not working (regression in 2.406)

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • 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.

          [JENKINS-71383] Confluence Publisher plugin space check not working (regression in 2.406)

          Oliver Daum created issue -
          Oliver Daum made changes -
          Attachment Original: js_output_job_config_warnings.png [ 60532 ]
          Oliver Daum made changes -
          Attachment New: js_output_job_config_warnings.png [ 60534 ]
          Oliver Daum made changes -
          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.
          Oliver Daum made changes -
          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.
          Oliver Daum made changes -
          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.
          Oliver Daum made changes -
          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.
          Oliver Daum made changes -
          Remote Link New: Dieser Vorgang ist mit "PR Deprecate Form.findMatchingInput (Webverknüpfung)" verknüpft [ 28730 ]
          Oliver Daum made changes -
          Attachment Original: js_output_job_config_warnings.png [ 60534 ]
          Oliver Daum made changes -
          Attachment New: image-2023-06-02-09-09-37-176.png [ 60535 ]

            basil Basil Crow
            oliverdaum Oliver Daum
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: