Closed peterwilsoncc closed 9 months ago
Let's also credit @maxledoux
and @pcrumm
for reporting the issue here as well.
@peterwilsoncc This looks good to me and seems to fix the issues mentioned.
That said, one of the reported issues was around scheduled posts, in particular this was the reported problem:
I tested these steps both on the develop
branch and on this PR branch. In both cases, I couldn't reproduce the first reported problem. On both branches, Pushing or Pulling scheduled content brought that content over in a draft state, not a published state.
But I was able to reproduce the second problem both on develop
and on this branch, so that part still needs addressed. I Pulled a scheduled post from Site A into Site B, it came over as a draft, I then updated the post on Site A and the post on Site B changed to published.
Sorry, just to add more details to ^ above as I tested this a bit more.
If when Pulling or Pushing you leave the Pull/Push as Draft
setting on, it will bring the item in a draft state, both on this PR and on develop
(which is correct behavior). If you turn that setting off, on develop
, it brings over scheduled items as published. With this PR, it brings over scheduled items as scheduled, which is correct.
So the remaining issue here is if you Pull a scheduled item in as a draft (which is the default) and you then update the original scheduled item, it turns the status from draft to published. I think ideal would be keeping it as draft but even changing it to scheduled would be better
So the remaining issue here is if you Pull a scheduled item in as a draft (which is the default) and you then update the original scheduled item, it turns the status from draft to published. I think ideal would be keeping it as draft but even changing it to scheduled would be better
In ee56b99dcc587641641a2aabd13b1a897e645bcd I've pushed a change to prevent the post status from being updated when updating a post. The post status will always need to be changed on the distributed copy of the content.
Testing notes:
Description of the Change
Fixes various issues relating to post statuses:
See #1149
How to test the Change
wp post generate --count=5 --post_title="MS1 Draft" --post_author=1 --post_status=draft
wp post generate --count=5 --post_title="MS1 Scheduled" --post_author=1 --post_status=future --post_date="2123-11-20 21:46:18"
Changelog Entry
Credits
Props @peterwilsoncc, @jeffpaul, @dkotter, @maxledoux, @pcrumm
Checklist: