Publicize: wpas_default_prefix, wpas_default_message, and wpas_default_suffix not working in Gutenberg
Steps to reproduce the issue
- Install latest WP
- Install Jetpack
- Activate Publicize module
- Connect Twitter account to Jetpack
- Install Gutenberg plugin
- Install a functional plugin (Code Snippets)
- Create a new snippet with the following code in Code Snippets:
function set_new_publicize_default_prefix($msg) {
return 'prefix-';
}
add_filter('wpas_default_prefix', 'set_new_publicize_default_prefix');
function set_new_publicize_default_msg($msg) {
return 'default';
}
add_filter('wpas_default_message', 'set_new_publicize_default_msg');
function set_new_publicize_default_suffix($msg) {
return '-suffix';
}
add_filter('wpas_default_suffix', 'set_new_publicize_default_suffix');
- Save & Activate code snippet
- Create new post with Gutenberg (use any title)
- Attempt to publish post
What I expected
I expected to see, in the "Customize your Message" text area, under "Share This Post" in the "Publish Settings" dialog of Gutenberg, the text prefix-default-suffix.
What happened instead
What I see in the "Customize your Message" area is the title of the post, instead.
Screenshots

Thanks for your contribution. I'll transfer this issue to the wp-calypso repository, where the Publicize integration is being built.
I would love to use a suffix so I can enable automatic hashtags on Twitter (for a local news site: news and location). Are any updates to this issue? Is there anything I can do (as a non-coder, though)? Thanks!
Hashtag support Requested in 2954721-zen
Is there any update on this? At the very least, if it's not going to be fixed you ought to update the documentation as it still tells you these should work: https://developer.jetpack.com/hooks/wpas_default_message/
At least in part, we can explore applying filters when setting the post REST API rest field: https://github.com/Automattic/jetpack/blob/master/projects/plugins/jetpack/modules/publicize/publicize.php#L874
Unknown: How do we ensure we're using the title? If the post hasn't been saved or the post title is edited, we can't pass the title (or at least rely on it). How do we dynamically handle this? Can we use this one field or do we need a few different fields and let the JS on the Gutenberg side put it together?
Assuming this is related, but I noticed that using emojis in the custom text causes this error:
Publishing failed. Could not update the meta value of _wpas_mess in database.
Huh. I never made the connection to emoji's being an issue, but I got annoyed tonight while trying to schedule a post and found this issue. Can confirm @slambert that removing the emoji fixes it. Some kind of silly collation issue I assume but it's a shame no feedback on this for a couple of years.
Support References
This comment is automatically generated. Please do not edit it.
- [ ] 2954721-zen