Enhanced Slack Sharing + ACF Block content
-
Hi! I’ve noticed after a recent Yoast update the appearing of ‘estimated reading time’ on our blog posts when shared on Slack. This is pretty nifty, however, in my specific use case, it always shows 0 mins. This is probably due to our content creation mecanism : custom Gutenberg block + ACF Custom fields applied to these blocks.
I’ve installed ACF Content Analysis for Yoast SEO and while it does seem to be taken into account regarding content analysis in the backend, it doesnt seem to change the calculation of content for this specific meta tag.
Is there a way to fix this ?
Thanks!
-
Hi,
Can you confirm you are using the latest version of WordPress 5.5.3, Yoast SEO for WordPress 15.2.1, and the latest version of your other plugins and themes?
We understand you are getting 0 minutes for the estimated reading time in the new enhanced Slack sharing feature.
Could you expound a bit more or provide more information and a screenshot on the custom Gutenberg block that you are using? Before installing the ACF Content Analysis for Yoast SEO, did you get an assessment from the content analysis that your content had 0 words?
You can learn more about the feature here — https://yoast.com/wordpress/plugins/seo/yoast-seo-enhanced-slack-sharing/ & https://yoast.com/help/enhanced-slack-sharing/
Hi!
Yes, Yoast 15.2.1, WordPress 5.5.3 and ACF content analysis 3.0. Core and all plugins are up to date.
“Before installing the ACF Content Analysis for Yoast SEO, did you get an assessment from the content analysis that your content had 0 words?”
Yes, just temporarily deactivated the plugin and it detects 0 words. Once the ACF content analysis is reactivated, a variable number is detected (as expected), but the meta tag is still as follows:
<meta name="twitter:data2" content="0 minutes">Regarding the ACF custom block, these are registered via ACF’s method: https://www.advancedcustomfields.com/resources/acf_register_block_type/ . I then create field groups whose condition is block is ‘some_block’, and they show up fine, generating gutenberg block code on the post_content.
Hope this helps!
Thanks for your confirmation and for clarifying everything. To investigate the issue further, we’d like you to please reset the Indexables tables and migrations by using the Yoast Test Helper plugin to see whether this resolves the issue for you.
- Install and activate the Yoast Test Helper plugin;
- Go to Tools → Yoast Test → Yoast SEO → Reset indexables tables & migrations options to reset it;
- Run the SEO data optimization from the SEO → Tools page;
Check whether this resolves the issue for you.
We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.
Not only does this not work, it actually throws a php error:
[Fri Nov 20 15:14:30.651317 2020] [php7:error] [pid 18506] [client 83.196.8.121:35640] PHP Fatal error: Uncaught YoastSEO_Vendor\\Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException: You have requested a non-existent service "Yoast\\WP\\SEO\\Helpers\\Indexing_Helper". Did you mean one of these: "Yoast\\WP\\SEO\\Builders\\Indexable_Builder", "Yoast\\WP\\SEO\\Helpers\\Blocks_Helper", "Yoast\\WP\\SEO\\Helpers\\Capability_Helper", "Yoast\\WP\\SEO\\Helpers\\Current_Page_Helper", "Yoast\\WP\\SEO\\Helpers\\Date_Helper", "Yoast\\WP\\SEO\\Helpers\\Environment_Helper", "Yoast\\WP\\SEO\\Helpers\\Home_Url_Helper", "Yoast\\WP\\SEO\\Helpers\\Image_Helper", "Yoast\\WP\\SEO\\Helpers\\Indexable_Helper", "Yoast\\WP\\SEO\\Helpers\\Language_Helper", "Yoast\\WP\\SEO\\Helpers\\Meta_Helper", "Yoast\\WP\\SEO\\Helpers\\Notification_Helper", "Yoast\\WP\\SEO\\Helpers\\Options_Helper", "Yoast\\WP\\SEO\\Helpers\\Pagination_Helper", "Yoast\\WP\\SEO\\Helpers\\Permalink_Helper", "Yoast\\WP\\SEO\\Helpers\\Post_Helper", "Yoast\\WP\\SEO\\Helpers\\Post_Type_Helper", "Yoast\\WP\\SEO\\Helpers\\Primary_Term_Helper", "Yoast\\WP\\SEO\\Helpers\\Product_Helper", "Yoast\\WP\\SEO\\Helpers\\Redirect_Helper", "Yoast\\WP\\ in /nas/content/live/devspire/wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/Container.php on line 307, referer: https://*****.com/wp-admin/tools.php?page=yoast-test-helperWe are sorry to hear that you are seeing a PHP fatal error and we can imagine how disappointing that could be for you.
Can you please confirm when exactly do you see the relevant PHP fatal error? Do you see it during the Indexables tables and migrations reset process or when you attempt to run the SEO data optimization?
We look forward to hearing from you.
It happens on the “Reset indexables tables & migrations options” page.
@simaooliveira We recently released an update to the Yoast Test Helper plugin, can you please confirm whether this error occurs when using the most current release of it (version 1.10).
Hi and thanks for the answer.
I’ve tried again after updating Yoast. It did work this time around (resetting index table), however the meta is still showing 0 minutes.
I’ve made some tests and it seems the issue comes from the wp_strip_all_tags function in /src/presenters/slack/enhanced-data-presenter.php (line 69). In this specific usage it seems to strip away all content, therefore resulting in 0 minutes. If I remove this function I get calculated results.
Hi,
There are two different issues that we will respond to below.
A. Yoast Not outputting the twitter:data2 tag for use with slack’s estimated reading time on pages made with ACF’s custom fields
This is an issue. We apologize for the trouble you are experiencing with our plugin. An issue report is currently open with our development team for this issue.We recommend commenting on the issue so you may be kept aware of updates. You may need an account before you can comment.
If you have further information or would like to follow the progress of the report, you can do that here: https://github.com/Yoast/yoast-acf-analysis/issues/282
B.PHP Fatal error: Uncaught YoastSEO_Vendor\\Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException: You have requested a non-existent service
Are you using composer at all on the site? If so, what version of it are you using? Also, what Symfony dependency is it using?Hi, and thanks for the response!
I dont actually need help with B anymore. I dont have composer at all on the site, this is a managed wordpress install and all I did was install the yoast test plugin as instructed above. As indicated, after updating Yoast Test it seemed to work.
Regarding A, i’ve added a filter on this specific tag for now, so this isnt blocking on my side, but I suppose other people will be affected.
Thanks!
Hi,
Ok, no worries! We are glad the issues have been resolved! We will close this in order to keep the overview.
If you experience any other issues or have questions feel free to create a new topic!
The topic ‘Enhanced Slack Sharing + ACF Block content’ is closed to new replies.