Structured Data Caching?
-
Hello
I have noticed since installing the Hummingbird plugin that Google is not reading the product availability correctly in my structured data. (I changed OutOfStock schema to InStoreOnly which showed on Google before the Hummingbird install).Does Hummingbird caching impact the “class-wc-structured-data.php” file?
If yes, is there a way to prevent this file being cached?
Thank you
-
Hello @jamesbestbuys
I hope you’re doing well!
Please let us know more information, what plugin you’re using to add the structured data? Is the
class-wc-structured-data.phpfile belong to that plugin?The Hummingbird does not cache PHP files, but it caches the front end pages. If changes are added to your site’s structured data, please clear cache so the data will be refreshed on a front end page.
Please advise,
Kind regards,
NastiaThank you for your reply Nastia
Thanks for letting me know that php files are not cached.
I believe the class-wc-structured-data.php file is created by WooCommerce and/or Yoast SEO plugin.
I am not an expert, but I am guessing that SEO issues are not a Hummingbird issue, but I will give a bit more detail just in case you have any suggestion…
When I get / view the php file in Dreamweaver, the stock availability schema is correct (InStoreOnly), but when I run it through Google’s Structured Data Testing Tool, it shows my product schema as OutOfStock.I will try to narrow down the cause of this and will also be in contact with Yoast to see if they have any suggestions.
Again, if you have any suggestions or can help point me in the right direction, it would be very much appreciated.
Kind Regards
JamesHello there @jamesbestbuys
Hope you’re doing well today! 🙂
The aforementioned file is coming from WooCommerce:
https://github.com/woocommerce/woocommerce/blob/master/includes/class-wc-structured-data.phpWhen I get / view the php file in Dreamweaver, the stock availability schema is correct (InStoreOnly), but when I run it through Google’s Structured Data Testing Tool, it shows my product schema as OutOfStock.
This sounds more like a caching issue indeed. Are you still getting this after clearing Page Caching in Hummingbird?
If so, you may have to clear any other caching affecting this website, most probably some kind of server-side caching.Warm regards,
DimitrisHello Dimitris
Yes, this still occurs even after clearing cache in Page Caching on Hummingbird.
I have some URL Strings which I am excluding from the page cache (see below)…
wp-.*\.php
index\.php
xmlrpc\.php
sitemap.xml
sitemap_index.xml
woo-product-feed-pro
cookie-noticeIs the first one ( wp-.*\.php ) preventing the structured data php from caching?
I think the first several url strings were already on the Page Caching settings when I first installed Hummingbird, but this used to work fine several months ago. 🤔
If this is not the problem area, I can try speaking to my server provider about the server-side caching as you suggested.
Kind Regards
JamesHello @jamesbestbuys ,
Did you hear back from your hosting provider about server caching?
Is the first one ( wp-.*\.php ) preventing the structured data php from caching?
This is one of the Hummingbird defaults that prevents caching of the WordPress files.
But Hummingbird doesn’t cache php files – it caches what is on the front end of the site.
Would it be possible if we could see how it looks on your site? Can you provide us URL to page where data is cached and it should not be?kind regards,
KasiaHello Kasia
Thank you for your teams help so far with this.
I spoke to my provider and they said that my site utilises PHP’s opcache, so changes made to any PHP files can take an hour or two to propagate. However, I believe this was also the case when my sites search results were showing correctly on Google, so I don’t think this is the issue.
Here is a URL to one of the product which should be appearing as “InStoreOnly” but instead appears as “OutOfStock” on Google search results and the Structured Data Testing Tool:
https://www.best-buys.co.uk/product/signature-weave-tilly-sofa-lounge-set-grey/Here is also the snippet from my class-wc-structured-data.php file showing the “availability” schema I have set up…
$markup_offer += array(
‘priceCurrency’ => $currency,
‘availability’ => ‘http://schema.org/’ . ( $product->is_in_stock() ? ‘InStock’ : ‘InStoreOnly’ ),
‘url’ => $permalink,
‘seller’ => array(
‘@type’ => ‘Organization’,
‘name’ => $shop_name,
‘url’ => $shop_url,
),Kind Regards
James-
This reply was modified 6 years, 9 months ago by
James.
Hello @jamesbestbuys ,
I’m sorry for the delay.
I can see in the code that it shows “OutOfStock” but cache is from 18-08-19 – so it should be updated.
Can you disable temporary Hummingbird cache (like turn off totally) and check if the problem will be gone?kind regards,
KasiaHello Kasia
Thank you for your reply.
We have managed to figure out that the structured data caching issue was being caused by another plugin we use for Google shopping, which was overriding the php file.Thank you and the rest of the WPMU DEV Support team for helping to narrow this issue down. Hummingbird is not the cause of this issue, so this can now be marked as resolved if you wish.
Kind Regards
JamesHello @jamesbestbuys
Glad to know that this issue is resolved!
I’ve marked this ticket as resolved for now, but if you need anything else at all, we’re here for you, please just reopen the ticket or create a new one.
Have a good day and take care!
Cheers,
Nastia -
This reply was modified 6 years, 9 months ago by
The topic ‘Structured Data Caching?’ is closed to new replies.