Skip to content

Conversation

@thcipriani
Copy link
Contributor

@thcipriani thcipriani commented Dec 18, 2025

Partially reverts 331c768.

In #8960 the out id was added to pre.console-output's "otherwise" case in console.jelly.

In 331c768, the out id was removed from otherwise when console output was moved from console.jelly to console-log.jelly.

This may have broken the "Copy" button in some instances.

When clicked, the copy button will copy the inner text of a container with the id referred to by the ref attribute of the copy button. The copy button's ref attribute is out.

Wikimedia's Jenkins has no element with the out id on the console page, which leads to copying null to the clipboard.

This was filed as https://phabricator.wikimedia.org/T410633.

Proposed changelog entries

  • Fix console log copy button for freestyle projects that have finished (regression in 2.493).

Proposed changelog category

/label bug

Proposed upgrade guidelines

N/A

Partially reverts 331c768.

In jenkinsci#8960 the `out` id was added to `pre.console-output`'s  "otherwise"
case in `console.jelly`.

In 331c768, the `out` id was removed from `otherwise` when console output
was moved from `console.jelly` to `console-log.jelly`.

This may have broken the "Copy" button in some instances.

When clicked, the copy button will copy the inner text of a container
with the id referred to by the `ref` attribute of the copy button. The
copy button's ref attribute is `out`.

Wikimedia's Jenkins has no element with the `out` id on the console
page, which leads to copying `null` to the clipboard.

This was filed as https://phabricator.wikimedia.org/T410633.
@comment-ops-bot comment-ops-bot bot added the bug For changelog: Minor bug. Will be listed after features label Dec 18, 2025
@MarkEWaite MarkEWaite added the web-ui The PR includes WebUI changes which may need special expertise label Dec 18, 2025
@timja timja requested a review from janfaracik December 18, 2025 22:15
@MarkEWaite MarkEWaite added regression lts-candidate When fixed, this issue should be considered for backporting to the LTS line labels Dec 21, 2025
@MarkEWaite
Copy link
Contributor

MarkEWaite commented Dec 22, 2025

Thanks for the proposed fix. I see the same failure on weekly.ci.jenkins.io at https://weekly.ci.jenkins.io/job/freestyle/1/console . When I click the copy button, it places the text 'null' on my clipboard.

The example at Wikimedia is on Jenkins 2.528.3 and yet I'm unable to duplicate the issue on ci.jenkins.io . Any hints what is different between ci.jenkins.io 2.528.3 and the Wikimedia 2.528.3?

I've labeled this as a regression and proposed that it should be backported to the next Jenkins LTS. If that is approved, it will be fixed in the 2.541.1 release Jan 21, 2026.

Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is now ready for merge. We will merge it after approximately 24 hours if there is no negative feedback.

/label ready-for-merge

@comment-ops-bot comment-ops-bot bot added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Dec 22, 2025
@MarkEWaite MarkEWaite linked an issue Dec 22, 2025 that may be closed by this pull request
@daniel-beck
Copy link
Member

daniel-beck commented Dec 22, 2025

Another regression caused on the classic UI by experimental changes 😢

@MarkEWaite MarkEWaite removed the lts-candidate When fixed, this issue should be considered for backporting to the LTS line label Dec 22, 2025
@MarkEWaite MarkEWaite merged commit abecec2 into jenkinsci:master Dec 22, 2025
18 checks passed
@welcome
Copy link

welcome bot commented Dec 22, 2025

Congratulations on getting your very first Jenkins core pull request merged 🎉🥳

This is a fantastic achievement, and we're thrilled to have you as part of our community! Thank you for your valuable input, and we look forward to seeing more of your contributions in the future!

We would like to invite you to join the community chats and forums to meet other Jenkins contributors 😊
Don't forget to check out the participation page to learn more about how to contribute to Jenkins.


@MarkEWaite
Copy link
Contributor

Fixed in 2.543.

MarkEWaite added a commit to MarkEWaite/jenkins that referenced this pull request Jan 3, 2026
Partially reverts 331c768.

In jenkinsci#8960 the `out` id was added to `pre.console-output`'s  "otherwise"
case in `console.jelly`.

In 331c768, the `out` id was removed from `otherwise` when console output
was moved from `console.jelly` to `console-log.jelly`.

This may have broken the "Copy" button in some instances.

When clicked, the copy button will copy the inner text of a container
with the id referred to by the `ref` attribute of the copy button. The
copy button's ref attribute is `out`.

Wikimedia's Jenkins has no element with the `out` id on the console
page, which leads to copying `null` to the clipboard.

This was filed as https://phabricator.wikimedia.org/T410633.

Co-authored-by: Mark Waite <[email protected]>
(cherry picked from commit abecec2)
@thcipriani
Copy link
Contributor Author

Thanks for the proposed fix. I see the same failure on weekly.ci.jenkins.io at https://weekly.ci.jenkins.io/job/freestyle/1/console . When I click the copy button, it places the text 'null' on my clipboard.

The example at Wikimedia is on Jenkins 2.528.3 and yet I'm unable to duplicate the issue on ci.jenkins.io . Any hints what is different between ci.jenkins.io 2.528.3 and the Wikimedia 2.528.3?

I was wondering the same thing.

We're using the official Jenkins Debian packages, so I'm unsure what about ci.jenkins.io is different exactly.

In any case, thank you for checking this and for the merge!

shalinisudarsan pushed a commit to shalinisudarsan/jenkins that referenced this pull request Jan 6, 2026
Partially reverts 331c768.

In jenkinsci#8960 the `out` id was added to `pre.console-output`'s  "otherwise"
case in `console.jelly`.

In 331c768, the `out` id was removed from `otherwise` when console output
was moved from `console.jelly` to `console-log.jelly`.

This may have broken the "Copy" button in some instances.

When clicked, the copy button will copy the inner text of a container
with the id referred to by the `ref` attribute of the copy button. The
copy button's ref attribute is `out`.

Wikimedia's Jenkins has no element with the `out` id on the console
page, which leads to copying `null` to the clipboard.

This was filed as https://phabricator.wikimedia.org/T410633.

Co-authored-by: Mark Waite <[email protected]>
(cherry picked from commit abecec2)
MarkEWaite added a commit to MarkEWaite/jenkins that referenced this pull request Jan 7, 2026
Partially reverts 331c768.

In jenkinsci#8960 the `out` id was added to `pre.console-output`'s  "otherwise"
case in `console.jelly`.

In 331c768, the `out` id was removed from `otherwise` when console output
was moved from `console.jelly` to `console-log.jelly`.

This may have broken the "Copy" button in some instances.

When clicked, the copy button will copy the inner text of a container
with the id referred to by the `ref` attribute of the copy button. The
copy button's ref attribute is `out`.

Wikimedia's Jenkins has no element with the `out` id on the console
page, which leads to copying `null` to the clipboard.

This was filed as https://phabricator.wikimedia.org/T410633.

Co-authored-by: Mark Waite <[email protected]>
(cherry picked from commit abecec2)
@MarkEWaite MarkEWaite mentioned this pull request Jan 7, 2026
14 tasks
MarkEWaite added a commit to MarkEWaite/jenkins that referenced this pull request Jan 7, 2026
Partially reverts 331c768.

In jenkinsci#8960 the `out` id was added to `pre.console-output`'s  "otherwise"
case in `console.jelly`.

In 331c768, the `out` id was removed from `otherwise` when console output
was moved from `console.jelly` to `console-log.jelly`.

This may have broken the "Copy" button in some instances.

When clicked, the copy button will copy the inner text of a container
with the id referred to by the `ref` attribute of the copy button. The
copy button's ref attribute is `out`.

Wikimedia's Jenkins has no element with the `out` id on the console
page, which leads to copying `null` to the clipboard.

This was filed as https://phabricator.wikimedia.org/T410633.

Co-authored-by: Mark Waite <[email protected]>
(cherry picked from commit abecec2)
shalinisudarsan pushed a commit to shalinisudarsan/jenkins that referenced this pull request Jan 8, 2026
Partially reverts 331c768.

In jenkinsci#8960 the `out` id was added to `pre.console-output`'s  "otherwise"
case in `console.jelly`.

In 331c768, the `out` id was removed from `otherwise` when console output
was moved from `console.jelly` to `console-log.jelly`.

This may have broken the "Copy" button in some instances.

When clicked, the copy button will copy the inner text of a container
with the id referred to by the `ref` attribute of the copy button. The
copy button's ref attribute is `out`.

Wikimedia's Jenkins has no element with the `out` id on the console
page, which leads to copying `null` to the clipboard.

This was filed as https://phabricator.wikimedia.org/T410633.

Co-authored-by: Mark Waite <[email protected]>
(cherry picked from commit abecec2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug For changelog: Minor bug. Will be listed after features ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback regression web-ui The PR includes WebUI changes which may need special expertise

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Console copy button on freestyle job does not copy to clipboard

3 participants