#29457 closed defect (bug) (fixed)
Saving a post with Quick Edit active on a comment results in the post not being saved
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.3 | Priority: | normal |
Severity: | normal | Version: | 3.9 |
Component: | Quick/Bulk Edit | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
While trying to save a post or page, and having Quick Edit open in the comments section, pressing the Update button results in the post not being saved and redirects to the Edit Posts Screen.
Steps to replicate:
- Edit any post or page that has at least one comment in the post editor.
- Make changes to the post content by typing in new text.
- Scroll down and click Quick Edit on any comment and leave it open.
- Scroll up and press the Update button.
- Expected: Post is saved and loads the post editor.
Actual: Post isn’t saved and loads the Edit Posts Screen (wp-admin/edit.php).
Attachments (1)
Change History (11)
#2
@
8 years ago
So after some digging it seems strange but line 395 and 407 use c.after( editRow ) and without these the redirect does not happen. In fact if you pass string in place of editRow the string will show and the redirect will not happen. So that leads me to beleive it may be something with editRow. If anyone else has some ideas from there that would be great.
#3
@
8 years ago
- Keywords has-patch needs-testing added; needs-patch removed
The issue here is that when the quick edit or comment reply form is open, a comment <form> element is added within the post edit form, which also contains an input[name="action"] overriding the input[name="action"] value on the edit post form.
Patch added to close the comment reply/edit form, which removes the form from the post edit form on submission of the post.
#4
@
8 years ago
- Keywords needs-patch added; has-patch needs-testing removed
- Version changed from 3.9.2 to 3.9
With the patch what it should do first is ensure that the comment hasn't been edited, or better confirm that you're going to lose the comment changes if you continue. If I change a comment while quick editing and forget to save it and then try to publish the post I'd lose my changes on the comment.
Once that is corrected, it looks good
#5
@
8 years ago
- Keywords has-patch needs-testing 2nd-opinion added; needs-patch removed
@chriscct7 I agree, however, I think what you propose is outside the scope of the ticket.
If you quick edit a comment and then try to reload the page via the browser, any changes are lost and there is no prompt, unlike the post editor.
This patch fixes the update post bug, but adding change detection and prompt functionality for the post comments meta box feels like it should be in its own ticket. What do you think?
#6
@
8 years ago
- Keywords needs-testing 2nd-opinion removed
- Milestone changed from Awaiting Review to 4.3
- Owner set to chriscct7
- Status changed from new to accepted
@polevaultweb Sure I'm good with that.
I was able to reproduce this using the steps described.