Snippet - Structured data errors and warnings

Hey guy’s

Thanks for the latest update of snippet, it resolved most of my problem’s regarding structured data.

But some error’s and warning’s is still standing.

1. Article image has a warning: "Attribut image.itemtype has an invalid value"
2. Publisher logo is missing. I can’t find anywhere to add this for the specific article.
3. mainEntityOfPage should have a value, but there is no field for this either. Is it possible to add a input field for this?

I have added link to my test result’s:
https://search.google.com/structured-data/testing-tool?url=https://digitypes.dk/visuel-kommunikation/#url=https%3A%2F%2Fdigitypes.dk%2Fvisuel-kommunikation%2F

Thanks for an awesome Theme solution with endless possibilities!
Looking forward hearing from you.

Best Regard’s Simon

This is an automated message to notify you that your thread was posted in the wrong forum, and it has been moved to the correct place. A member of our team will be happy to reply just as soon as your thread is up. How support works.

For support, please post all questions in the Support Forum.

For peer to peer conversations with other Themeco customers about tips, customizations, or suggestions you are welcome to use the Conversation Forum (no official support provided here).

Design & Development, Marketing & Media, and Hosting & Optimization are for discussion with fellow Apex members about non Themeco related topics. Please keep this in mind in the future.

Thank-you!

1 Like

Hi, thanks for asking!

We review this errors through the latest update and there are warnings on Google Structured Data Testing Tool (GSDTT), but Schema.org definitions allow that.

According to http://schema.org/image the value can be either ImageType object OR (string) url, but GSDTT only accepts ImageType. For that, we have two extra required fields, width and height. So this fields must be informed per image - at this point, we don’t offer this option but trying to figure out a better way to do that to all images.

We’ll add publisher’s logo and mainEntityOfPage soon for Article.

1 Like

Hi, @SimonDigitypes,

2.0.1 version of extensions is out. On this version of Snippets we change images to ImageType. Now you’ll have at first new validation error at this point: heightand width. This occurs because the stored value is just to the image url.

The solution: images now use Wordpress media manager, so you need to reselect each image and height/width` will be got from there and stored on the snippet.

And, at last, logo field is now available - default to Snippet -> Organization tab -> logo - and optional mainEntityOfPage.

Thanks!

1 Like

Hello again :slight_smile:

Thanks for the updates last time they worked perfect. Hope it is okay that I used the same thread for my new support request.

Now Google structured data gives me some new errors regarding Blog Posting shown in the screendumbs.

I have looked at http://schema.org/BlogPosting. The only thing I can see that differes is blank space between words, Blog and posting but have no clue what so ever if that matters when it comes the errors I get from googles testing tool:

https://search.google.com/structured-data/testing-tool#url=https%3A%2F%2Fdigitypes.dk%2Fcopyright-eller-creative-commons%2F

Again thanks for an awesome job with support, and the greatest WP theme on the market <3

Best Regards Simon

Hi, Simon!

Confirmed as a bug. You can fix temporarily editing the file wp-content/plugins//snippet/functions/class-snippet-json-ld.php and at line 376 change:

$json_ld['@type'] = strip_tags( $metabox_value );

to:

$json_ld['@type'] = strip_tags( str_replace(' ', '', $metabox_value) );

Next time we kindly ask you to create another post for better tracking!

Thanks!

Hey!

At least but not last: after this fix, BlogPostingschema throws the same errors Article did about imageTypeand logo.

That will be fixed in the next release of Snippet.

Thanks!

Hi! I just installed that snippets plugin and got warning messages about Publisher and Publisher Logo. What should I do about it? This is what it says:

Warning: array_key_exists() expects parameter 2 to be array, boolean given in /home/pearlm6/public_html/wp-content/plugins/snippet/functions/class-snippet-meta-box.php on line 416

Hi, @pearlmultimedia,

Please confirm: do you mean you’re getting warnings on Google Structured Data Testing Tool (GSDTT) for Publisher and publishers’ logo? If yes, that’s already addressed on next version of Snippet extension (about to launch pretty soon).

About this Warning: array_key_exists(): is also addressed on next version to be fixed. For now, you can edit the file wp-content/plugins/snippet/functions/class-snippet-meta-box.php and right after the line 414 change from:

      case 'snippet':
        $data  = get_option('snippet');
        $value = array_key_exists($field, $data) ? $data[ $field ] : null;
        break;

to:

      case 'snippet':
        $data  = get_option('snippet');
        if (!is_array( $data )) {
            $value = null;
        } else {
          $value = array_key_exists($field, $data) ? $data[ $field ] : null;
        }
        break;

This will avoid the warning.

Hope it helps! Stay tuned for Snippet updates.

Thanks!

Hi, yes that’s where I’m getting the warning, in Google Structured Data Testing Tool. What happens if I just leave it as is for now, since you are going to fix it soon? Will it cause an error in Search Console?

Hi, there,

This is supposed to happen only on backend side. Are you getting that anywhere else (like on a page or post)?

You’re good to wait for the update if it’s not sensitive for you(I can confirm you that it will be out in few days).

Thanks!