-
Notifications
You must be signed in to change notification settings - Fork 805
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 sharing buttons and like buttons when copying a post #14291
Conversation
Caution: This PR has changes that must be merged to WordPress.com |
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: January 14, 2020. |
scottsweb, Your synced wpcom patch D37227-code has been updated. |
I just pushed a fix, thanks for your suggestion @kraftbj - it looks to have worked. Before: After: So I think the original issue can be marked as resolved. I do however have a lingering concern, when the settings for sharing and likes are set to 'on' for all new posts and pages, I went into a specific post and turned them off. This gave me the following meta: It is a shame that When copying in this state though, the meta on the copied post is very different:
Should probably become:
and then we can perform the same check for sharing Do you see that having any other negative impacts? |
It does indeed seem like a bug, and I like your suggestion for a fix. |
scottsweb, Your synced wpcom patch D37227-code has been updated. |
@jeherve fix has been pushed: Original: Copy: Values stay as boolean. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to work well in my tests. Should be good to merge.
r201430-wpcom |
* [not verified] Remove empty readme section * Initial changelog for 8.2 * Changelog: add #14220 * Changelog: add #14252 * Changelog: add #14291 * Changelog: add #14309 * Changelog: add #14304 * Changelog: add general connection log. * Changelog: add #14275 * Changelog: add #14313 * Changelog: add #14213 * Changelog: add #14357 * Add sync testing instructions * Add 8.1.1 changelog back See eeaafab and 61757eb * Changelog: add #14371 * Changelog: add #14386 * Changelog: add #14471 * Changelog: add #14325 * Changelog: add #14194 * Changelog: add #14340 * Changelog: add #14418 * Changelog: add #14417 * Changelog: add #14075 * Changelog: add #14467 * Changelog: add #14307 * Changelog: add #14326
Looks like we are explicitly setting
sharing_disabled
andswitch_like_status
meta despite the original post relying on the global setting for these to show. It is creating some inconsistencies as per: #14117Fixes #14117
Changes proposed in this Pull Request:
Is this a new feature or does it add/remove features to an existing part of Jetpack?
Bug fix
Testing instructions:
From the issue:
Note: Even if wp-admin is showing the correct values for these toggles, we have been seeing different results in the theme on the front end, so check both places.
Digging deeper. The meta data before the fix is applied:
Original post:
Copied post:
The meta data after the fix is applied:
Original post:
Copied post:
Ideally
switch_like_status
would not have been set at all in this scenario - but it does seem to work. I think we might need something better than theisset
check.Proposed changelog entry for your changes: