Jump to content
artigianidelweb

[SOLVED] productcomments and schema.org/Rating - google error

Recommended Posts

hello,

i have installed productcomments module;

 

if I test a page on https://developers.google.com/structured-data/testing-tool/
 seems to be errors:

 

"For the review did not specify the item reviewed."

 

it seems that name is missed.

 

How can fix it?

 

 

Thank you so much!

post-889524-0-45446900-1436798506_thumb.jpg

post-889524-0-37125800-1436798508_thumb.jpg

Edited by artigianidelweb (see edit history)

Share this post


Link to post
Share on other sites

PS:

 

I seen in code there is

                        <p itemprop="name">
                            <strong>{$comment.title}</strong>
                        </p>

Maybe i should change it to <strong>{$productName}</strong> ?

  • Like 1

Share this post


Link to post
Share on other sites

yes is it just so.

    <div class="comment row" itemprop="review" itemscope itemtype="http://schema.org/Review">

but it seems that google test https://developers.google.com/structured-data/testing-tool/

catches some errors: the name is not corretc (in fact in name itemprop there is $commentname)

 

hould I change it?

<p itemprop="name">
                          {$comment.title}
                        </p>

o

<p itemprop="name">
                            <strong>{$productName}</strong>
                        </p>
  • Like 1

Share this post


Link to post
Share on other sites

Ok, we solved:

 

 

BY google https://developers.google.com/structured-data/testing-tool/

was missing itemReviewed (required*) value;

 

so we added

                        {if isset($product->name)}
                            {assign var="productName" value=$product->name}
                        {/if}                
                        <p itemprop="itemReviewed"   style="display:none;">
                            {$productName}
                        </p>

Above:

                        <p itemprop="name">
                            <strong>{$comment.title}</strong>
                        </p>  

and it was solved for google:

 

Solved.JPG

Edited by artigianidelweb (see edit history)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More