Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted February 12, 20205 yr If copy JS block with "aggregateRating" from page and put to google https://search.google.com/structured-data/testing-tool/ you can see errors like DiscussionForumPosting - Invalid object type for field "itemReviewed" Missing Nаme for Author and other errors.
February 20, 20214 yr On 2/12/2020 at 5:41 PM, desti said: Blocked all "aggregateRating" using if (0). Sorry, can you explain more?
March 1, 20214 yr Author /* 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(), ); }
August 6, 20213 yr This seems to have cropped up again in 4.6... Relating to Gallery images... Invalid object type for field 'itemReviewed' and also: error Review has multiple aggregate ratings Edited August 6, 20213 yr by The Old Man
August 29, 20213 yr 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
August 30, 20213 yr 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?
September 24, 20213 yr 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.
October 1, 20213 yr 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
October 6, 20213 yr 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));}}
October 11, 20213 yr 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
November 3, 20213 yr Solution This has been resolved in the latest 4.6.8 release. Please upgrade to get the latest release, and let us know if you see any further issues.