Jump to content

Updating tpl of module not refreshes in the front end


Recommended Posts

Perhaps you know Google Search Console is looking for Reviews authors being of type either Person or Organization (now detected as Thing) if not correctly done.

In my case I have a free module for Reviews (Revws from Datakick). It is pretty nice, but it started to appear the warning Invalid object type for field "author" in Google Search Console end of 2021.

I have identified this code

<div class="revws-review-author-name" {if $microdata}itemprop="author"{/if}>{$review.displayName|escape:'html':'UTF-8'}</div>

In modules/revws/views/templates/widgets/review-list/item.tpl

That appears in Chrome (I can see with F12 - developers tool). And I know I have to replace by

        <div class="revws-review-author-name" >
           <div itemprop="author" itemscope itemtype="http://schema.org/Person">
                <meta itemprop="name" content="{$review.displayName|escape:'html':'UTF-8'}">
            </div>
            {$review.displayName|escape:'html':'UTF-8'}
        </div>

I know have to replace, because I tested in the tool from Google to test rich results. My problem is that I modify the tpl in the location modules/revws/views/templates/widgets/review-list/item.tpl but I still see the old code, no matter I delete the cache in Prestashop, force recompile, clear cache in my browser, browse as incognito, ... I have tried to delete everthing, and not ok.

I have modified some other tpl from the theme, and it is quite straight forward, so I suspect the difference is I am doing now for a module, instead. Not sure if related, but it does not get updated the translation of the customer reassurance module either (I see it translated from a few days ago from English to Spanish, but it still appears in English, no matter I delete cache from everywhere, force recompilation, etc., etc.

Well, for the moment I would be very grateful if I could identify a solution just for the first of my problems, which is basically to get the code of Revws updated when navigating to the shop.

image.thumb.png.6523aeb614a58553f9ae0bdaa5ca9721.png

 

Thank you in advance.

Link to comment
Share on other sites

  • 2 months later...

io l'ho risolto così, sono andato in: /home/xxxxx/public_html/xxxxxxx/modules/revws/views/templates/widgets/review-list/item.tpl

 

e alla riga 17 ho sostituito il codice:

<div class="revws-review-author">
    <div class="revws-review-author-name" {if $microdata}itemprop="author"{/if}>{$review.displayName|escape:'html':'UTF-8'}</div>

con:

<div class="revws-review-author">
    <div class="revws-review-author-name" itemscope itemtype="http://schema.org/Person" {if $microdata}itemprop="author" {/if} ><span itemprop="name">{$review.displayName|escape:'html':'UTF-8'}</span></div>

 adesso Author @type non è più Thing, ma Person

Funziona perfettamente!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...