janboddez / share-on-mastodon

Easily share WordPress posts on Mastodon.
https://jan.boddez.net/wordpress/share-on-mastodon
GNU General Public License v3.0
39 stars 5 forks source link

no share if scheduled post is published #40

Closed MaxED9 closed 1 year ago

MaxED9 commented 1 year ago

Hi,

in most case I schedule my posts, but the plugin doesn't share it if the publish time is reached and the post online. If I edit and update the post, it works fine.

janboddez commented 1 year ago

Do you use a mobile app or WordPress itself for creating/scheduling these posts?

If you use WP’s admin interface, there should be a "meta box" with a checkbox in it. When the post is first saved, its value is remembered. When the post is first published, it will check this value and trigger syndication (or not).

If you create posts from another application (like a mobile app), WP never "sees" this checkbox, until you revisit the post in WP Admin.

If that's the case, there are several things you could do, see also: https://jan.boddez.net/wordpress/share-on-mastodon#share_on_mastodon_enabled

MaxED9 commented 1 year ago

Hi Jan,

thanks for your reply. I use only the WP backend, no third party or mobile WP app. The checkbox is/was checked. But maybe the reason could be that I installed the plugin after I scheduled the posts. 🤔

I will keep an eye on it, having now new posts in the pipeline.

janboddez commented 1 year ago

Ah, that would explain.

Yes, the checkbox is always enabled when a post is first created (unless you apply the filter hook to make it opt-in). But its value is only saved to the database when the post itself is saved. This gives you the opportunity to not share, by unchecking it before you hit Publish (or Schedule).

So, what you're seeing is "intended behavior."

MaxED9 commented 1 year ago

Hi again,

worked fine with a new scheduled post.

thanks for your help

janboddez commented 1 year ago

You're welcome, glad the plugin is working for you!