WP Discourse エラーメッセージ:32000 文字を超える

こんにちは
@simon さん、これについてご存知かもしれません。

この投稿 をリンク先の Discourse トピックに更新しようとしましたが、32,000 文字を超えているというエラーメッセージが表示されました。実際にはそんなことはありません。投稿を Discourse に公開する際は問題なく動作しました。

参考までに、私が使用している functions.php のエントリーを以下に示します:

// iframe 経由で Discourse に埋め込まれた WP 投稿を表示する
// https://meta.discourse.org/t/wp-discourse-how-to-deal-with-shortcodes-in-post/58838/5
add_filter( 'discourse_publish_format_html', 'wpdc_custom_discourse_publish_format_html', 10, 2 );
function wpdc_custom_discourse_publish_format_html( $output, $post_id ) {
    $permalink = get_the_permalink( $post_id );
	$content_post = get_post( $post_id );
	$content = $content_post->post_content;
	$content = apply_filters('the_content', $content);
	$content = str_replace(']]>', ']]>', $content);

	ob_start();
	?>
		
    <iframe width="690" height="2000" src="<?php echo esc_url( $permalink ); ?>" frameborder="0"></iframe>
	<div data-hide="true"><?php echo $content; ?></div>
		
	
	<?php
		
    $output = ob_get_clean();

    return $output;

}

// njegos vukadin による Upwork 関連

add_action( "wp_head", "detect_embedding", 1 );
add_action( "wp_head", "modify_embedded_links", 11 );

function detect_embedding()
{
?>
<script>
    function isEmbedded () {
	    try {
	        return window.self !== window.top;
	    } catch (e) {
	        return true;
	    }
	}
	if( isEmbedded() ){
		document.documentElement.className = document.documentElement.className + " embedded";
	}
</script>
<style>
	.embedded body > *:not(#page),
	.embedded #main > *:not(article),
	.embedded #right-sidebar {
		display:none!important;
		visibility:hidden!important;
	}

	.embedded #main {
		margin:0;
	}

</style>
<?php
}

function modify_embedded_links(){
?>
<script>
    jQuery(document).ready(function($){
		if( isEmbedded() ){
			$("a").filter(function(){
				return this.href.split("#")[0] !== window.location.href.split("#")[0];
			}).attr("target","_blank");
		}
	})
</script>
<?php
}

エラーメッセージは、投稿を公開した際に Discourse から返されるレスポンスです。エラーが発生しているのに投稿が公開されたことに驚いています。

投稿全体を iframe として公開しているため、なぜ iframe の後に投稿コンテンツを追加しているのかよくわかりません。

ディスコース検索で投稿が関連性を持つことを確認するため