Schema markup is an essential element of optimizing your website for search engines. However, the advantages of having a Schema markup may quickly disappear when the Schema is improperly set up or corrupted. So, you should always rectify Schema markup-related issues as soon as you identify them.
In this knowledgebase article, we will delve into some common Schema markup problems and provide solutions to resolving them. So, let’s dive in and get your schema markup back on track!
In this guide, we’ll cover:
1 My Schema is Corrupted
You may have encountered a situation where your post or page editor appears to break when you click on the Schema tab. This is the result of a corrupted Schema. Below, we will show you how to delete the corrupted Schema from your database.
Note: Changes to the database can result in errors that cannot be undone and may harm your website. You should make a backup of your website/database before you continue.
1.1 Delete the Schema Using Bulk Actions PRO
If you have Rank Math PRO, navigate to WordPress Dashboard → Posts or Pages and select the affected posts or pages. Once done, click Bulk actions, as shown below.
In the Bulk actions menu, select Set Schema: None. Once done, click Apply.
Note: This method will delete all Schema, corrupted and uncorrupted, from the selected posts or pages. To delete only the corrupted Schema, you’ll have to do that through the database.
1.2 Delete the Schema From the Database
First, navigate to WordPress Dashboard → Posts or Pages. Once done, hover over the affected post or page. A URL will display at the bottom-left corner of your screen. Take note of the number in between ?post=
and &action=edit
. That is your post ID.
After getting your post ID, log into your database. For this example, our database is located in cPanel → phpMyAdmin.
Note: You may need to contact your host for your database’s location and login details.
From the phpMyAdmin dashboard, select the affected database, as shown below.
Next, enter postmeta
in the search bar. Once the postmeta
table shows up, click on it, as shown below.
Now, select Show all. If unavailable, set the Number of rows option to 500
. Once done, enter the post id you copied earlier, followed by rank_math_schema
, into the Filter rows bar.
If you click Show all, you will be presented with the Schema markups on the post id. If you set the Number of rows to 500
, you will use the navigation arrows to head to the next page until the Schema markups are displayed.
Once the Schema markups are displayed, head to the corrupted Schema and click Delete. Once done, you can return to WordPress to add a new Schema to the post.
2 Search Console Displays Missing Field “Image”
If you use WooCommerce, you may encounter a Missing field “image”
error message in Google Search Console. You’re experiencing this error because you’re not using the WooCommerce Product Schema on your product pages. Below, we’ll show you how to resolve the error.
Note: Rank Math automatically adds the featured or product image to the Product Schema markup. So, before you begin, head to the affected product page and confirm that you have added a featured or product image.
2.1 Update the Schema Using Bulk Actions PRO
First, navigate to WordPress Dashboard → Rank Math SEO → Titles & Meta → Products and set the Schema Type to WooCommerce Product. Once done, scroll down the page and click Save Changes.
Next, navigate to WordPress Dashboard → Products and select the affected products. Once done, click the Bulk actions dropdown, as shown below.
In the Bulk actions menu, select Set Schema: Default (product). Once done, click Apply. The WooCommerce Product Schema will now be applied to your products.
2.2 Update the Schema From the Product Page
Navigate to WordPress Dashboard → Products and click on the applicable product.
Next, head to the Rank Math SEO metabox and click the Schema icon, as shown below.
Once done, click Schema Generator, as shown below.
Note: If you’re using Rank Math FREE, you’ll need to delete the existing Schema to add a new one.
Now, you’ll select the WooCommerce Product Schema, as shown below.
Once done, click Save for this Post. The WooCommerce Product Schema will be added to the page. You can now proceed to Update the page to save your changes.
3 Search Console Displays Invalid DateTime Value for UploadDate
Google has updated its structured data guidelines for Video Schema, which modifies the data format for UploadDate
Schema property. If your website includes old Video Schema data fetched from YouTube, then it is possible you might see these warnings in Google Search Console or Google Rich Results Testing tool:
- Datetime property “uploadDate” is missing a timezone
- Invalid datetime value for “uploadDate”
To fix these warnings, please include the below filter to your theme’s rank-math.php file
. This filter will ensure that the UploadDate
Schema property includes the correct timezone information.
/**
* Filter code to add time & timezone in existing Video Schema
*/
add_filter( 'rank_math/snippet/rich_snippet_videoobject_entity', function( $entity ) {
if ( empty( $entity['uploadDate'] ) ) {
return $entity;
}
$parts = explode( 'T', $entity['uploadDate'] );
if ( ! empty( $parts[ 1 ] ) ) {
return $entity;
}
$entity['uploadDate'] = wp_date( 'Y-m-d\TH:i:sP', strtotime( $entity['uploadDate'] ) );
return $entity;
} );
4 Schema Does Not Delete
If you’re unable to delete a Schema, then you likely have a firewall installed on your site. To solve that, navigate to your firewall settings and whitelist the below route.
/wp-json/rankmath/v1/updateMeta
You can refer to this guide to whitelisting Rank Math in Wordfence.
If you use Sucuri, refer to this guide on whitelisting Rank Math in Sucuri.
If you use Cloudflare, refer to this guide on whitelisting Rank Math in Cloudflare.
5 Search Console Displays Missing Field “hasCourseInstance”
When you inspect your URL in Google Search Console or the Rich Results test tool, it may return a Missing field “hasCourseInstance”
error. The error may be accompanied by a Missing field "offers"
error, as shown below.
You’re encountering these errors because your Course Schema data needs to be updated with the Course Instance and Offers properties. Here’s how to do it.
Note: Before we begin, head to WordPress Dashboard → Plugins and ensure that Rank Math has been updated to the latest version.
5.1 Navigate to the Course Schema
First, head to the content displaying the error. Here, click the Rank Math SEO icon, as shown below.
Next, click the Schema icon.
Then, head to the Course Schema and click the Edit icon, as shown below.
5.2 Fill in the Course Instance Property
Now, head to the Course Instance property and fill in the Course Mode and Course Workload fields. You can refer to our dedicated KB on Course Schema to learn more about these specific fields.
If you also see the Missing field "offers"
error, head to the Offers property and fill in the Category, Price, and Currency fields. Once done, click Save for this Post.
To sum up, resolving Schema markup-related issues is crucial for improving your website’s search engine visibility and overall user experience. So, take the time to address any Schema issues you may have encountered and reap the benefits of improved online visibility and user engagement.
We hope you are able to resolve the Schema markup issues you encountered on your WordPress site. If you have any questions, you’re more than welcome to contact our dedicated support team. We’re available 24/7, 365 days a year…