In the last two days, only one article has been shared on Mastodon every day. We can’t explain the error, there is no change, no plug-in conflict and everything is running normally. Besides, it is the second article of the day on one day and the fourth on the other, so it’s completely arbitrary.
Does anyone have any idea what could be causing this?
Every time I make a post or update an existing post, Share on Mastodon gives me an error. This is from the automatic email:
WordPress version 6.5.5
Active theme: OceanWP (version 3.5.7)
Current plugin: Share on Mastodon (version 0.19.0)
PHP version 7.4.33 Error Details
An error of type E_ERROR was caused in line 179 of the file /home/domain/website/wp-content/plugins/share-on-mastodon/includes/class-image-handler.php. Error message: Uncaught Error: Call to undefined function Share_On_Mastodon\mime_content_type() in /home/domain/website/wp-content/plugins/share-on-mastodon/includes/class-image-handler.php:179
Stack trace:
0 /home/domain/website/wp-content/plugins/share-on-mastodon/includes/class-post-handler.php(212): Share_On_Mastodon\Image_Handler::upload_image(5201, ‘KINSHI MASAMUNE…’, Array)
/home/domain/website/wp-content/plugins/share-on-mastodon/includes/class-post-handler.php(129): Share_On_Mastodon\Post_Handler->post_to_mastodon(Object(WP_Post))
/home/domain/website/wp-includes/class-wp-hook.php(326): Share_On_Mastodon\Post_Handler->toot(Object(WP_Post))
/home/domain/website/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
/home/domain/website/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
/home/domain/website/wp-includes/post.php(4817): do_action(‘sa
The post is published OK, but never shared on Mastodon.
]]>Is it possible, on a multi-author site, for each author to share to their individual mastodon account?
]]>It used to work and then stopped a couple of months ago. The connection to my Mastodon server is fine (I disconnected & reconnected), and I have it set to a 5 minute delay.
The problem might coincide with enabling Cloudflare protection on my login page. What logs should I check to track the issue down, or do you think Cloudflare is the culprit.
]]>Hi
Been using the plugin for some time, as well as IndieBlocks (+ latest versions of ActivityPub, Webmention, Webfinger, IndieWeb, etc.).
Noticed this error appears on repeat (like a loop, really…) in the PHP error log on my host.
PHP Deprecated: ctype_digit(): Argument of type int will be interpreted as string in the future in /srv/data/web/vhosts/www.”domainname”/htdocs/wp-content/plugins/share-on-mastodon/includes/class-block-editor.php on line 111
Sincerely
DJM
]]>Hi there
I was having a slight issue with posting with what is probably a conflict with Subscribe2 plugin. When the post goes out and my emails are sent out to subscribers and it goes onto Mastodon, for a minute or 2, my site goes offline. It comes back fairly quickly, but I thought I could resolve it by putting the delay for Mastodon to 300 seconds. I tried today and basically it didn’t share at all. (I have now shared manually directly on Mastodon as I couldn’t work out how to reshare. I can disable the subscribe2 sending for a second send.)
Ellie
]]>For some reason my scheduled posts are not sharing to Mastodon at publish time. If I edit a post after it publishes, and turn off S2M, update, turn on S2M, then update again, then it shares as it should.
I had been messing with Jetpack sharing and the ActivityPub plugin, but have now confirmed that posts created (and scheduled) after both of those were turned off has not shared at the scheduled time.
]]>Hi again
Sorry to keep bugging you, but how would I avoid the appearance of 2 images in the post? The one is the post link image, the other is the image with the alt text, from the post itself. The one with the alt text would be best to keep, for the visually impaired.
Is it perhaps unavoidable?
cheers
Ellie
]]>Hi there, first, thank you so much for creating this plugin.
I have just installed the plugin and created a test post which worked fine in that the title and a link to the post appeared in Mastodon.
I would have liked to have the post text also appear on Mastodon. Is that possible? How would I do that?
And how do I include hashtags in my posts?
I am sure this won’t be possible, but in the old Google+ days, the plugin which behaved similarly also ported the comments from G+ to the blog. I suppose that’s too much to hope for…?
I will try an image post next, but wanted to get this sorted first.
Cheers
Ellie
]]>Using:
Share On Mastodon v.0.17.1
Only a single image is being sent to Mastodon on posts that contain one featured image and one in-content image.
ActivityPub sees both images and sends both to my wordpress instance. I’d like Share On Mastodon to do the same for my personal mastodon account.
Settings:
Using:
Share On Mastodon v.0.17.1
The ‘shortcode’ of %excerpt% outputs on Mastodon as “excerpt“. All other shortcodes work properly. Excerpt does not function as intended.
Thoughts. Has this been encountered by others preceding me?
When I use the plugin it works fine on directly published posts.
But with scheduled posts it always makes mastodon toots with the ID instead of the real URL. So when users click on it, they can’t reach the post.
Example: https://reliverse.social/@rpi/110712777734433356
links to https://material.rpi-virtuell.de/material/61815/ which can’t be found but should link to
https://material.rpi-virtuell.de/material/educating-religious-education-teachers/ which equals
https://material.rpi-virtuell.de/index.php?page_id=61815
About a week ago my new posts stopped being posted to Mastodon. Of course I can’t think of any changes I made that would have caused it. I’ve been using it for months with no problems.
I’m using Version 0.17.0 on WP Version 6.3.1.
I’ve tried revoking and re-authorizing access. I turned on logging and I don’t see anything in the log file related to this plugin.
Can you tell me what the next step would be to trouble shoot? It’s such an awesome plugin and has been doing exactly what I need for many many months now.
EDIT: OK, going back through settings I see that there is a setting specific to this plugin to turn on debugging that wasn’t ticked. Somehow I managed to change the wp-config file without changing this setting. I will update once I publish a new post tomorrow.
]]>Not a bug per se, just a note for others. Just installed 0.17.0, and the “Share on Mastodon” box vanished in my (Classic) Editor sidebar. I was able to restore it by checking the “Use ‘classic’ meta box” in the Advanced settings (noted as “experimental”).
Again, not a bug, but a bit of a surprise (and not easily gleaned from the ChangeLog).
]]>I would love to be able to share my old blog posts the way I do to Twitter right now to Mastodon. I’m moving away from Twitter and would like to get visibility for my older posts on Mastodon. Thank you.
]]>A helpful feature would be the ability to post to multiple mastodon accounts.
]]>This plugun is one of the finest that I’ve ever used – it does one thing, and does it exceedingly well!
One critisism though – why haven’t you added loads of other plugins. or a combo. that can post to other social networks?
]]>Request for ability to add hashtags either automatically from WP tags or a box to add them when publishing a post. Hashtags really help Mastodon items
]]>I wish the option of publishing only the featured image (not all images from article), with the suboption of choosing a specific thumbnail or full frame.
]]>Hello,
First: great plugin!
Now the issue:The plugin appears to work fine, but just when published directly from the WordPress editor page.
If I auto-publish articles in the blog via scripts or 3rd party website, the plugin doesn’t recognize the article being published and, so, doesn’t send the toot to Mastodon.
When I update a post created with a script, then it is sent to Mastodon.
Any ideas?
Thanks
]]>Is there any chance you could add Pleroma support, as well as Mastodon?
]]>Hi Jan — I’ve been using the plugin for some time without incident, and then I tried to crosspost a normal blog post and the plugin said “Validation failed: Text character limit of 500 exceeded.” I tried reformatting, and also reset the settings on the plugin and then uninstalled and reinstalled the plugin but am still getting the error
]]>Hi. I just edited about 30 old posts to solve a text color problem, and all 30 ended up being shared to Mastadon in quick succession. I’m sure my followers felt spammed. It would be great to have an option to exclude updates; only sharing new posts is ideal.
]]>Hi Jan, I activated your plugin and went through the setup process and saved everything. Unfortunately nothing is published on Mastodon and, checking the authorized applications on my Mastodon profile, your plugin is not there… Where am I wrong or how can I fix it?
]]>Hi! Love your plugin and have been using it and it’s been working great. One weird thing I noticed today is that if I schedule a wordpress post to publish at a later date, when it’s shared on mastodon it doesn’t include my tag elements. If I unlink it and update the wordpress post (without changing anything), the new masto post includes the tags. Weird, right?
Here’s my addition to my theme’s functions.php:
add_filter( 'share_on_mastodon_status', function( $status, $post ) {
$toot_size = (int) 500;
//$message_template = "[title]\n\n[excerpt]...\n\nRead more: [permalink]\n\n[tags]";
$message_template = "[excerpt]...\n\nRead more: [permalink]\n\n[tags]";
//Replace title
//$post_title = html_entity_decode(get_the_title($post), ENT_COMPAT, 'UTF-8');
//$message_template = str_replace("[title]", $post_title, $message_template);
//Replace permalink
$post_permalink = get_permalink( $post );
$message_template = str_replace("[permalink]", $post_permalink, $message_template);
//Replace tags
$post_tags_content = '';
$post_tags = get_the_tags($id);
if ($post_tags) {
foreach ($post_tags as $tag) {
$post_tags_content = $post_tags_content . '#' . preg_replace('/\s+/', '', html_entity_decode($tag->name, ENT_COMPAT, 'UTF-8')) . ' ';
}
$post_tags_content = trim($post_tags_content) . ' #music #blog';
}
$message_template = str_replace("[tags]", $post_tags_content, $message_template);
//Replace excerpt
//Replace with the excerpt of the post
$post_optional_excerpt = $post->post_excerpt;
if (strlen($post_optional_excerpt) > 0) {
$post_content_long = $post_optional_excerpt;
} else {
$post_content_long = $post->post_content;
}
$post_content_long = strip_shortcodes($post_content_long);
$post_content_long = html_entity_decode($post_content_long, ENT_COMPAT, 'UTF-8');
$post_content_long = wp_strip_all_tags($post_content_long);
$excerpt_len = $toot_size - strlen($message_template) + 27 - 5; // + 9 - 5;
mb_internal_encoding("UTF-8");
$post_excerpt = mb_substr($post_content_long, 0, $excerpt_len);
$message_template = str_replace("[excerpt]", $post_excerpt, $message_template);
$status = trim( $message_template );
return $status;
}, 10, 2 );
//add_filter( 'share_on_mastodon_toot_args', function( $args ) {
// $args['spoiler_text'] = 'New on Glorious Noise...';
// return $args;
//} );
add_filter( 'share_on_mastodon_toot_args', function( $args, $post = null ) {
$args['spoiler_text'] = 'New on Glorious Noise...';
if ( $post ) {
$args['spoiler_text'] = html_entity_decode(get_the_title( $post ));
}
return $args;
}, 10, 2 );
I’m guessing it has something to do with my get_the_tags($id). Does that not exist on scheduled posts?
]]>I made a thing for Share on Mastodon – https://ajdg.solutions/blog/format-your-toots-on-mastodon-when-using-share-on-mastodon/
It formats toots better so shared posts are more appealing. Simply add te snippet to your themes functions.php and enjoy nicer shared posts.
]]>The plugin works in my test environment, authorization was a bit tricky, but now it posts to Mastodon.
Featured images are posted to Mastodon, but not images included from the media library via the Image block in the editor. Any idea, what’s the problem or how to change that? I don’t quite understand the “attached image” relationship in this context.
Thanks.
]]>