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
Scheduled posts not publishing #116
Comments
This is also happening when posts are auto-published from a source feed. This could be corn job issue. |
Appears that it could be related to the publish capability not being valid while publishing via cron |
is there a way to ignore that check if it's a cron like feed-pull ? |
We'll evaluate the best solution for an upcoming release of the plugin. You're welcome to submit a pull request of your own as well. |
We are seeing issues like this as well, though I'm not entirely sure if it is just scheduled posts. Specifically, certain posts will appear in the Apple News dashboard as "last updated at Never" and "Sync Status" not published. Hitting publish pushes them to Apple News. In addition, we are seeing posts that "needs to be updated" under sync status after post edits are made, but the updates aren't being pushed. This should happen automatically when an update to a post is made. This may be relevant. Our site uses alternative (real) cron, rather than WP Cron, since we don't want cron running on every pageload. Our cron runs every minute. |
Hello, thank you for the work on the plugin. Any update on this bug? |
We're currently reevaluating priorities. I'll update soon hopefully. |
Should just be a case of disabling the check for cron:
|
We'll take a look at this next week and sort out the root of why this was here in the first place, but it seems like a reasonable suggestion. |
Where did you pull those lines of code from? That's not actually in the source anywhere. What's actually in the source does not include a cron check: I'm thinking this is more of a permissions issue, to be honest. |
The above code was the suggested replacement for the code you linked to. current_user_can will always return false during a cron run (deliberately), so it needs the code altered to bypass the check. |
@bcampeau @smerriman I just updated this plugin today, and auto-publishing is still not working on our site. Our site does not use wp_cron. I'm guessing that our use of real cron jobs may be the issue here. I haven't had a chance to troubleshoot more yet, but will do so and report back. |
I would suspect that you're possibly getting caught in the permission check because the Thanks. |
@bcampeau Is the plugin purposely meant to only publish to Apple News for administrators? I think we're getting caught in two things here. The first is that we have editors and authors who publish articles, who will not have the default "manage_options" capability that the plugin is looking for. I see the Without a different default setting or a UI, I'd think that many sites are going to fail to push articles based on this restriction, and the UI and documentation isn't clear about it. |
Our team took over development of the plugin about a year ago from another agency. In the original version of the plugin (version 0.2.0) they chose to make In version 1.0.0, we added the However, as with any open source software, once something is established in code and put out into the world, you can't just change it. For every site like yours that this is a problem for, there are other sites who may be depending on this being the established default. I'd accept the documentation could be clearer about it, but at this point, there's no changing it easily. It's very simple to override in your theme as needed via the filter. I do agree this could use further consideration for an update in a future version of the plugin and I've opened issue #223 accordingly. |
I found a new issue with latest update. Its is publishing even the scheduled drafts into apple news. we used a feed pull as and save them as a draft. After updating the plugin the saved draft is being published on apple news automatically. Loos like the logic needs to be rechecked. Looks like it is bypassing |
@agk4444 can you please reference the specific line of code you believe is causing problems? There is no such thing as a 'scheduled draft' in WordPress, so maybe your terminology is just confusing here. |
I am sorry for the confusion. I meant to say we are using a cron to create a draft post. When the draft is created it publishes to apple news with being published. |
Your use case is non-standard, but it definitely introduces a problem with this logic. We'll look at pushing a hotfix this week but you can hook your own custom function into the filter |
Thanks, I already commented out that part of the code for now. Thanks for looking into this. |
Looks like an extra set of brackets was added in the committed version vs my suggestion above (where the cron check only cancels out the permission check, not the whole statement). |
I thought the same thing but did not have time to test it. So I commented out both permission and cron check which was working for some time for me. |
We'll look at it soon. |
The fix for this is in master, releasing to .org now as well. Thanks for the catch. |
Had a couple reports, worth investigating: https://wordpress.org/support/topic/schedule-articles-not-publishing-to-apple-news?replies=2
The text was updated successfully, but these errors were encountered: