Make WordPress Core

Opened 3 years ago

Last modified 3 years ago

#54621 assigned defect (bug)

Unsaved comment warning without any changes made when click on Publish, Update or Preview Buttons

Reported by: askaryabbas's profile askaryabbas Owned by:
Milestone: Awaiting Review Priority: normal
Severity: major Version: 4.6
Component: Comments Keywords: needs-patch reporter-feedback
Focuses: javascript, administration Cc:

Description

Hi Team,

I got unsaved comment changes warning without any changes made in the content of the custom post type post, here is screenshot: https://i.imgur.com/PQmirDL.png
I see new codes are added in the WordPress core file: wp-admin/js/edit-comments.js And there is some condition issue, the code is have strict equality comparison operator to undefined ID which is not present in the custom post type: #replyrow
Screenshot: https://i.imgur.com/kAHNkrs.png

Please review it.
Thanks

Attachments (1)

unsaved-changes.png (548.8 KB) - added by askaryabbas 3 years ago.

Download all attachments as: .zip

Change History (7)

#1 follow-up: @SergeyBiryukov
3 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 6.0
  • Version changed from 5.8.2 to 4.6

Hi there, welcome back to WordPress Trac! Thanks for the report.

Moving to 6.0 for investigation. The code in question was introduced in [37303] / #32818, changing the version accordingly.

Also removing the coding-standards focus, as even though this appears to be a valid issue, it doesn't seem related to the WordPress PHP or JS coding standards.

#2 in reply to: ↑ 1 @askaryabbas
3 years ago

Replying to SergeyBiryukov: Thanks @SergeyBiryukov

Hi there, welcome back to WordPress Trac! Thanks for the report.

Moving to 6.0 for investigation. The code in question was introduced in [37303] / #32818, changing the version accordingly.

Also removing the coding-standards focus, as even though this appears to be a valid issue, it doesn't seem related to the WordPress PHP or JS coding standards.

#3 @davidbaumwald
3 years ago

  • Focuses coding-standards removed
  • Keywords reporter-feedback added

@askaryabbas I looked into this, and I wasn't able to replicate this specific issue on a CPT, but I was able to find a related issue. I filed a separate ticket for it, as its scope is a bit larger, and may not completely resolve the issue on a CPT.

Can you go through the steps to reproduce this on a custom post type? Did you click on "Reply" on any of the comments before clicking "Update" on your post?

#6 @davidbaumwald
3 years ago

  • Milestone changed from 6.0 to Awaiting Review

Moving this out of the current milestone until this is confirmed as a bug.

Note: See TracTickets for help on using tickets.