Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix overwriting of published post meta when previewing footnote changes #54339

Merged
merged 2 commits into from
Sep 27, 2023

Conversation

adamsilverstein
Copy link
Member

Fixes bug discovered in #52988

What?

Why?

How?

Testing Instructions

Testing Instructions for Keyboard

Screenshots or screencast

Copy link
Member

@Mamaduka Mamaduka left a comment

Choose a reason for hiding this comment

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

@adamsilverstein, just to clarify: this is a different bug discovered while working on #52988 and can be tested/merged separately + recommended to be backported into a minor release.

Are the above statements correct?

P.S. Can you also provide quick testing instructions?

@Mamaduka Mamaduka added the [Block] Footnotes Affects the Footnotes Block label Sep 13, 2023
@jorgefilipecosta
Copy link
Member

I think we can merge this PR, update_post_meta is just an update_metadata call, with additional logic to in case of revisions update the original post instead of the revision.

	$the_post = wp_is_post_revision( $post_id );
	if ( $the_post ) {
		$post_id = $the_post;
	}

Here it seems we want to avoid that logic to have the possibility of having revisions for the footnones.

Copy link
Member

@jorgefilipecosta jorgefilipecosta left a comment

Choose a reason for hiding this comment

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

The change looks good to me 👍

@Mamaduka
Copy link
Member

If the e2e fails again, it might require rebasing due to core changes. See #54452.

@adamsilverstein
Copy link
Member Author

Rebased against trunk

@Mamaduka Mamaduka merged commit 2823ea0 into WordPress:trunk Sep 27, 2023
47 checks passed
@github-actions github-actions bot added this to the Gutenberg 16.8 milestone Sep 27, 2023
@bph bph added the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Oct 5, 2023
@mikachan mikachan removed the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Footnotes Affects the Footnotes Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants