[email protected]
Forum Replies Created
-
Forum: Plugins
In reply to: [Share on Mastodon] Plugin says character limit exceeded every timeThanks Jan — I’m going to try some or all of those suggestions. And thanks again for taking the time to help me, I really appreciate it!
Forum: Plugins
In reply to: [Share on Mastodon] Plugin says character limit exceeded every timeThanks, Jan — I assumed it would auto-truncate the post regardless of how many characters it was, and indeed it seems to be doing that, so not sure why that error would show up sometimes and not other times. I don’t use excerpts in WordPress so it is just grabbing the post and making its own excerpt I assume. The filter or function is this:
add_filter( ‘share_on_mastodon_status’, function( $status, $post ) {
// Create a short preview of the post
$status = “New blog post\n\n”;
$status .= “\”” . get_the_title($post) . “\”\n\n”;
$status .= get_the_excerpt($post);
// Remove the … forced by the excerpt and replace with the Unicode symbol
$status = html_entity_decode($status);
// Add a link
$status .= “\n\nRead more: ” . get_permalink( $post );
// Add tags
$tags = get_the_tags( $post->ID );
if ( $tags ) {
$status .= “\n\n”;
foreach ( $tags as $tag ) {
$status .= ‘#’ . preg_replace( ‘/\s/’, ”, $tag->name ) . ‘ ‘;
}
}
$status = trim( $status );
return $status;
}, 10, 2 );Forum: Plugins
In reply to: [Share on Mastodon] Plugin says character limit exceeded every timeThanks — I reverted to the original filter and it seems to work now. But it has always auto-truncated the post when sharing to Mastodon, so I still don’t know why I sometimes got the error and other times not. But thanks for your feedback!
Forum: Plugins
In reply to: [Share on Mastodon] Plugin says character limit exceeded every timeI have been using a function/filter, yes — to add more than just a headline and link. I used code from this site: https://shkspr.mobi/blog/2022/11/better-sharing-of-wordpress-posts-to-mastodon/
I don’t have different categories of post, but I did try to edit the filter to remove the posting of the title. Perhaps I screwed it up somehow ?? PHP is not my forte.
What seemed strange is that some posts would publish on Mastodon just fine, and others would produce the error, but I couldn’t see any difference between those that did and those that didn’t.
Forum: Fixing WordPress
In reply to: 2.5 Automatic Plugin Upgrade – PCLZip errorI got the same thing. It happens because another plugin has pclzip activated and running already — likely WordPress Automatic Upgrade. Just deactivate that plugin and it should work fine.