Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 19 months ago

#56197 closed defect (bug) (fixed)

Continued post lock data inconsistencies

Reported by: nathannoom's profile nathan.noom Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.0.1 Priority: normal
Severity: normal Version: 5.0
Component: Editor Keywords: has-patch
Focuses: Cc:

Description

There are continued inconsistencies between data returned by the two post lock functions. This was originally supposed to be addressed in #55238, but was not resolved in both locations.

wp_check_locked_posts returns the user's name, but wp_refresh_post_lock does not:
https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-admin/includes/misc.php#L1140-L1142
https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-admin/includes/misc.php#L1193-L1194

Change History (8)

This ticket was mentioned in PR #2964 on WordPress/wordpress-develop by trinadin.


2 years ago
#1

Addresses an issue where wp_check_locked_posts returns the user's name, but wp_refresh_post_lock does not.

Trac ticket: https://core.trac.wordpress.org/ticket/56197

#2 @SergeyBiryukov
2 years ago

Hi there, welcome to WordPress Trac! Thanks for the ticket and the PR.

I think this looks good to include in WP 6.0.1.

#3 @SergeyBiryukov
2 years ago

  • Milestone changed from Awaiting Review to 6.0.1

#4 @SergeyBiryukov
2 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 53692:

Editor: Include user's name in the wp_refresh_post_lock() response.

This ensures that the post lock data returned by the Heartbeat API is consistent.

Previously, wp_check_locked_posts() was updated to return the name of the user currently editing the post, but the wp_refresh_post_lock() response did not get a similar change.

Follow-up to [53070].

Props nathan.noom.
Fixes #56197.

#5 @SergeyBiryukov
2 years ago

In 53693:

Editor: Include user's name in the wp_refresh_post_lock() response.

This ensures that the post lock data returned by the Heartbeat API is consistent.

Previously, wp_check_locked_posts() was updated to return the name of the user currently editing the post, but the wp_refresh_post_lock() response did not get a similar change.

Follow-up to [53070].

Props nathan.noom.
Merges [53692] to the 6.0 branch.
Fixes #56197.

SergeyBiryukov commented on PR #2964:


2 years ago
#6

Thanks for the PR! Merged in r53692, backported to the 6.0 branch in r53693.

#7 follow-up: @Mamaduka
22 months ago

I think this is a duplicate of #55238.

The fix should've been a part of 6.0. However, I'm not sure if the original patch got reverted.

#8 in reply to: ↑ 7 @nathan.noom
22 months ago

Replying to Mamaduka:

I think this is a duplicate of #55238.

The fix should've been a part of 6.0. However, I'm not sure if the original patch got reverted.

Not a duplicate. The change needed to be applied in two places, but it was only applied in one of them. This is stated clearly in the ticket description. No need to revert the original patch.

Version 0, edited 22 months ago by nathan.noom (next)
Note: See TracTickets for help on using tickets.