Okay, we’re looking at this file:
/lib/discourse-publish.php
And comparing 2.1.2 and 2.1.3, here are the only differences (concerning Force Publish):
if ( ( 0 === $force_publish_max_age ) || $post_time >= $min_date ) {
was changed to:
if ( ( ( 0 === $force_publish_max_age ) || $post_time >= $min_date ) && $is_rest_request ) {
And these additional lines were added:
// The Force Publish setting can't be easily supported with both the Block and Classic editors. The $is_rest_request
// variable is used to only allow the Force Publish setting to be respected for posts published with the Block Editor.
$is_rest_request = defined( 'REST_REQUEST' ) && REST_REQUEST;
If I had to guess, maybe the old way was throwing errors in the Block editor? So, could it be as simple as using a conditional?
is_block_editor or use_block_editor_for_post might work:
if ( is_block_editor() ) {
// do it the new way
} else {
// do it the old way
}