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

Scheduled posts not sharing? #98

Closed janboddez closed 8 months ago

janboddez commented 9 months ago

See also https://wordpress.org/support/topic/scheduled-posts-not-sharing/

janboddez commented 9 months ago

This is what my DevTools show ... when I click schedule:

image

janboddez commented 8 months ago

OK, so in this one case, what seems to happen is the backend does not save the _share_on_mastodon value.

Which I can't explain; it's no different than when we publish right away!

That is, it's all done by WordPress core. All we do is tell WordPress the field exists, and sanitize it when it's there:

https://github.com/janboddez/share-on-mastodon/blob/4cbdd5c04ddd1b8b0b8b925b2a423da29a994fab/includes/class-block-editor.php#L168-L-173

We check permissions, we save the value, or rather, turn it into a (string, because ... historical reasons) "1" or "0".