Jump to content

Google - Invalid object type for field "itemReviewed"


Go to solution Solved by Marc,

Recommended Posts

  • 1 year later...
  • 2 weeks later...
Posted
		/* Are ratings allowed? */
		if(0) // AND !$topic->isArchived() AND $topic->container()->forum_allow_rating AND $topic->averageRating() )
		{
			\IPS\Output::i()->jsonLd['topic']['aggregateRating'] = array(
				'@type'			=> 'AggregateRating',
				'ratingValue'	=> $topic->averageRating(),
				'ratingCount'	=> $topic->numberOfRatings(),
			);
		}

 

  • 5 months later...
  • 4 weeks later...
Posted

It is here again

Search Console has identified that your site is affected by 2 Review snippets issues:

Top Errors

Errors can prevent your page or feature from appearing in Search results. The following errors were found on your site:

Review has multiple aggregate ratings

Invalid object type for field "itemReviewed"

We recommend that you fix these issues when possible to enable the best experience and coverage in Google Search.

Invision Community v4.6.5.1

Posted
On 8/28/2021 at 8:58 PM, media said:

It is here again

Search Console has identified that your site is affected by 2 Review snippets issues:

Top Errors

Errors can prevent your page or feature from appearing in Search results. The following errors were found on your site:

Review has multiple aggregate ratings

Invalid object type for field "itemReviewed"

We recommend that you fix these issues when possible to enable the best experience and coverage in Google Search.

Invision Community v4.6.5.1

When was the last time the page was crawled? (Was it when you were on 4.6?) 

Are you able to provide an example URL so we can see the content? 

  • 4 weeks later...
Posted
On 3/1/2021 at 4:15 PM, desti said:
		/* Are ratings allowed? */
		if(0) // AND !$topic->isArchived() AND $topic->container()->forum_allow_rating AND $topic->averageRating() )
		{
			\IPS\Output::i()->jsonLd['topic']['aggregateRating'] = array(
				'@type'			=> 'AggregateRating',
				'ratingValue'	=> $topic->averageRating(),
				'ratingCount'	=> $topic->numberOfRatings(),
			);
		}

 

How to get the number o ratings and the number of reviews on Pages?

$record->numberOfRatings()

or

$record->rating_hits

are not working.

Posted
On 10/1/2021 at 1:36 PM, Andy Millne said:

Can you please provide the full json-ld snippets that are failing validation and a link to the failing page? I'm not seeing any issues with how aggregateRating is implemented

Hello @Andy Millne!

I don't know if I am wrong, but I have realized that when review is on for Pages database, there  is no $record->rating_hits, only $record->record_reviews as long as the rating stars will be based on the reviews, so the rating hits are the same as the record reviews. Is that right?

So I have used record reviews for ratingCount and reviewCount.

{{\IPS\Output::i()->jsonLd['article'] = array('@context' => 'http://schema.org/', '@type' => 'Product', 'name' => $record->_title, 'image' => 'https://cdn.mydomain.com/ ' . $record->record_image, 'brand' => array('@type' => 'Thing', 'name' => $marca['nome']), 'aggregateRating' => array('@type' => 'AggregateRating', 'ratingValue' => $englishrating, 'ratingCount' => $record->record_reviews, 'reviewCount' => $record->record_reviews), 'offers' => array('@type' => 'AggregateOffer', 'lowPrice' => $lowPrice, 'highPrice' => $highPrice, 'offerCount' => $results_number, 'priceCurrency' => 'BRL', 'availability' => $availability));}}

 

Posted
On 10/6/2021 at 3:16 AM, sobrenome said:

Hello @Andy Millne!

I don't know if I am wrong, but I have realized that when review is on for Pages database, there  is no $record->rating_hits, only $record->record_reviews as long as the rating stars will be based on the reviews, so the rating hits are the same as the record reviews. Is that right?

So I have used record reviews for ratingCount and reviewCount.

{{\IPS\Output::i()->jsonLd['article'] = array('@context' => 'http://schema.org/', '@type' => 'Product', 'name' => $record->_title, 'image' => 'https://cdn.mydomain.com/ ' . $record->record_image, 'brand' => array('@type' => 'Thing', 'name' => $marca['nome']), 'aggregateRating' => array('@type' => 'AggregateRating', 'ratingValue' => $englishrating, 'ratingCount' => $record->record_reviews, 'reviewCount' => $record->record_reviews), 'offers' => array('@type' => 'AggregateOffer', 'lowPrice' => $lowPrice, 'highPrice' => $highPrice, 'offerCount' => $results_number, 'priceCurrency' => 'BRL', 'availability' => $availability));}}

 

Please could you also provide the item mentioned by my colleague there? It just means we can save some time and get to the bottom of the issue for you

  • 2 weeks later...
  • 2 weeks later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...