-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Posts: scheduled posts aren't published after clicking "Publish" in the posts list #4330
Comments
I can repeat this one — "Publish" action does not actually publish the post; I'd expect this action to change the post publish date to |
This is still a problem. I did some investigation, and found the problem is that the API request (here) to publish it only sets Of course I'm sure that by itself would have unintended consequences, and needs to be further refined, but I'm not familiar enough with how everything connects to say offhand what the full solution should be. Hat tip to @catehstn for the ping saying it's still an issue |
Another nudge today from @catehstn Steps:
|
Related: promoting a draft to published from within Posts
|
Concerning scheduled posts, two observations:
Coming up with a transversal way of dealing with scheduled posts that is clear and comforting for the user would be nice. |
Related to this flow, but I know separate for the implementation, are two glaring bugs or UX gaps:
|
To expand on Scott's findings, the root cause is that Core's I can reproduce the issues that @mcsf reported above, but they seem to have different causes. For context, Core doesn't have a similar flow to Calypso for this, where you can publish from the All Posts list. In wp-admin, you have to navigate to the Edit Post screen, and either:
If you do A, then Core wipes out the date, and Back to Calypso... The WPCOM API endpoint already explicitly sets valid dates for drafts before @hoverduck, you mentioned some unintended consequences, though. I'm not seeing anything in my testing so far, can you point me in the right direction? |
If anyone's curious, I've prepared |
This is fixed as of Since it was API-side, it'll need to be merged into Jetpack to work on Jetpack sites. The patch was tested with one, though, so it should work without any modifications to the endpoint. CC @dereksmart |
When publishing scheduled posts directly from the `posts/scheduled/{site}` screen in Calypso, the API request to the update endpoint would only the `post_status` field. When the endpoint passed that data on to `wp_insert_post()`, it would be considered invalid input, because it the existing scheduled `post_date_gmt` field was used, and that date is in the future. Core doesn't have a flow similar to Calypso's, so it never encounters this condition normally, and it expects posts to have dates in the past when they're being published. In response to the invalid input, `wp_insert_post()` would override the `post_status` and set it back to `future`, so the post would never be published. The solution to that is to explicitly set the date to the current timestamp before calling `wp_insert_post()`. Fixes Automattic/wp-calypso#4330 Differential Revision: https://[private link] Merges r160864-wpcom.
When publishing scheduled posts directly from the `posts/scheduled/{site}` screen in Calypso, the API request to the update endpoint would only the `post_status` field. When the endpoint passed that data on to `wp_insert_post()`, it would be considered invalid input, because it the existing scheduled `post_date_gmt` field was used, and that date is in the future. Core doesn't have a flow similar to Calypso's, so it never encounters this condition normally, and it expects posts to have dates in the past when they're being published. In response to the invalid input, `wp_insert_post()` would override the `post_status` and set it back to `future`, so the post would never be published. The solution to that is to explicitly set the date to the current timestamp before calling `wp_insert_post()`. Fixes Automattic/wp-calypso#4330 Differential Revision: https://[private link] Merges r160864-wpcom.
Steps to reproduce:
Result: clicking "Publish" in the list of scheduled posts triggers two messages, "Updating Post …" and "Updated," however, the post does not get published and remains in the scheduled posts list (2m52s)
Seen at https://wordpress.com/posts/scheduled/watchingstormsrollby.me using Firefox 45.0.1 on Mac OS X 10.11.13, also tested with Chrome 49.0.2623.87 on Mac OS X 10.11.13
Possibly related: #3886, #3969
/hat tip @helenhousandi for the report
The text was updated successfully, but these errors were encountered: