Jump to content

PS 1.6 Website - Received Breadcrumb warning from Google 21/1/20 need help....


cwiz
 Share

Recommended Posts

Hi,

I run a PS 1.6.1.24 website and today I like I assume alot of other people received a "Breadcrumb Warning" for 90% of my indexed web pages.

I have found a number of posts online for this and an official post from Google re changing from Data-vocabulary.org to Schema.org for the Breadcrumbs and this update from Google

https://webmasters.googleblog.com/2020/01/data-vocabulary.html

However - I'm not a coder and don't know how to implement this???

My breadcrumb.tpl file from the theme folder is below, is it this file that needs to be altered or other files??

Can anybody help if it is this file with modifying it to the Scheme.org breadcrumb setup??

Here is my breadcrumb.tpl file

{*
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2015 PrestaShop SA
*  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}

<!-- Breadcrumb -->
{if isset($smarty.capture.path)}{assign var='path' value=$smarty.capture.path}{/if}
<div class="breadcrumb clearfix">
    <a class="home" href="{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}" title="{l s='Return to Home'}"><i class="icon-home"></i></a>
    {if isset($path) AND $path}
        <span class="navigation-pipe"{if isset($category) && isset($category->id_category) && $category->id_category == 1} style="display:none;"{/if}>{$navigationPipe|escape:'html':'UTF-8'}</span>
        {if $path|strpos:'span' !== false}
            <span class="navigation_page">{$path|@replace:'<a ': '<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a itemprop="url" '|@replace:'data-gg="">': '><span itemprop="title">'|@replace:'</a>': '</span></a></span>'}</span>
        {else}
            {$path}
        {/if}
    {/if}
</div>
{if isset($smarty.get.search_query) && isset($smarty.get.results) && $smarty.get.results > 1 && isset($smarty.server.HTTP_REFERER)}
<div class="pull-right">
    <strong>
        {capture}{if isset($smarty.get.HTTP_REFERER) && $smarty.get.HTTP_REFERER}{$smarty.get.HTTP_REFERER}{elseif isset($smarty.server.HTTP_REFERER) && $smarty.server.HTTP_REFERER}{$smarty.server.HTTP_REFERER}{/if}{/capture}
        <a href="{$smarty.capture.default|escape:'html':'UTF-8'|secureReferrer|regex_replace:'/[\?|&]content_only=1/':''}" name="back">
            <i class="icon-chevron-left left"></i> {l s='Back to Search results for "%s" (%d other results)' sprintf=[$smarty.get.search_query,$smarty.get.results]}
        </a>
    </strong>
</div>
{/if}
<!-- /Breadcrumb -->

 

Full respect for any help

Scooterck

 

Edited by cwiz
spelling mistake (see edit history)

Share this post


Link to post
Share on other sites

Find the solution working for me on https://www.vinvin.dev/fils-dariane-problemes-detectes/

Text in french but here is a translation...hope this help

Best regards

Patrick

 

Fix on Prestashop
Personally, the 2 warning emails I received concern two Prestashop shops.

So here is the procedure to correct this on your shop (Prestashop 1.6).

Go to your theme folder and open the breadcrumb.tpl file.

and replace all the content with this one (it works with the default theme of Prestashop 1.6) :

(Be careful though, your breadcrumb of your theme may not be the same as this one... and in that case, you'll certainly need to call a Prestashop developer to adapt it).

Fixed the BreadCrumb :
https://gist.githubusercontent.com/vinvin27/39d61ebe902170d8d92ef57ccd261e3f/raw/563f5b5c06bf8e09f2c91baa3798c48916b7b3e0/Breadcrumb%20%20Prestashop%201.6


Don't forget to empty the Prestashop cache to take into account the changes in the tpl file.

Check that Google likes editing
Google's "structured data test" tool allows you to validate that everything is working properly after this change.

Go here: https://search.google.com/structured-data/testing-tool/u/0/

And copy/paste the link from your BreadCrumb page.

Before you probably got the warning:

image.png.f364ec688ce54d90f9bfac0f3a174fb5.png

And then after editing the breadcrumb.tpl: 

image.png.e8c5c5053c1b7c2a68636014d6566c7e.png


Victory.

Share this post


Link to post
Share on other sites

Hi ,im with custom theme  can you see what must edit.

Tnx.

 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2016 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}

<!-- Breadcrumb -->
{if isset($smarty.capture.path)}{assign var='path' value=$smarty.capture.path}{/if}
<div class="breadcrumb title_font clearfix">
    <a class="home title_font" href="{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}" title="{l s='Return to Home'}"><span  class="title">{l s='Home'}</span></a>
    {if isset($path) AND $path}
        <span class="navigation-pipe"{if isset($category) && isset($category->id_category) && $category->id_category == 1} style="display:none;"{/if}>><i class="icon-chevron-right"></i></span>
        {if $path|strpos:'span' !== false}
            <span class="navigation_page title_font">{$path|@replace:'<a ': '<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a itemprop="url" '|@replace:'data-gg="">': '><span class="title" itemprop="title">'|@replace:'</a><span class="navigation-pipe">': '</span></a></span><span class="navigation-pipe"><i class="icon-chevron-right"></i>'|@replace:'</span><span class="navigation-pipe">':'<span class="navigation-pipe"><i class="icon-chevron-right"></i>'}</span>
        {else}
            {$path}
        {/if}
    {/if}
</div>
{if isset($smarty.get.search_query) && isset($smarty.get.results) && $smarty.get.results > 1 && isset($smarty.server.HTTP_REFERER)}
<div class="pull-right">
    <strong>
        {capture}{if isset($smarty.get.HTTP_REFERER) && $smarty.get.HTTP_REFERER}{$smarty.get.HTTP_REFERER}{elseif isset($smarty.server.HTTP_REFERER) && $smarty.server.HTTP_REFERER}{$smarty.server.HTTP_REFERER}{/if}{/capture}
        <a href="{$smarty.capture.default|escape:'html':'UTF-8'|secureReferrer|regex_replace:'/[\?|&]content_only=1/':''}" name="back">
            <i class="icon-chevron-left left"></i> {l s='Back to Search results for "%s" (%d other results)' sprintf=[$smarty.get.search_query,$smarty.get.results]}
        </a>
    </strong>
</div>
{/if}
<!-- /Breadcrumb -->

Share this post


Link to post
Share on other sites

Thank you sincerely for the fixes, I have now requested a validation fix for the problem from Google.

I used the code in the message from @Electols and that works perfectly. Tested each warning was 78 last night, now at 320 with Rich Snppets test tool and its all good.

I contacted my custom theme developer and they sent me exactly the same code update as the default theme update in the message from @Electols, after finally realising that there was a problem with the breadcrumbs file, so other users with custom themes, give it a try (worked for me :) )

Full respect to everybody that help

Scooterck

Share this post


Link to post
Share on other sites

OMG! module??? IMHO The right solution it change bredcrumb.tpl ONLY! All other solutions abnormal.
Here for native default-bootstrap theme ps 1.6.1.24 fully adapted for schema.org file breadcrumb.tpl

file content:

<!-- Breadcrumb -->
{if isset($smarty.capture.path)}{assign var='path' value=$smarty.capture.path}{/if}
{if !empty($path)}
{$matchCount = preg_match_all('/<a.+?href="(.+?)"[^>]*>([^<]*)<\/a>/', $path, $matches)}
{$breadcrumbs = []}
{for $i=0; $i < $matchCount; $i++}
{$breadcrumbs[] = ['url' => $matches[1][$i], 'title' => $matches[2][$i]]}
{/for}
{$match = preg_match('/>([^<]+)(?:<\/\\w+>s*)?$/', $path, $matches)}
{if !empty($matches[1])}
{$breadcrumbs[] = ['url' => '', 'title' => $matches[1]]}
{elseif !$match && !$matchCount}
{$breadcrumbs[] = ['url' => '', 'title' => $path]}
{/if}
{/if}
<div class="clearfix">
	<ol class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList">
		<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> 
			<a class="home" href="{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}" title="{l s='Return to Home'}" itemprop="item">
				<i class="icon-home"></i>
			</a>
			<meta itemprop="name" content="{l s='Home'}" />
			<meta itemprop="position" content="1" />
		</li>
{if !empty($breadcrumbs)}
{foreach from=$breadcrumbs item=breadcrumb name=crumbs}
		<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
{if !empty($breadcrumb.url)}
			<a href="{$breadcrumb.url}" itemprop="item" title="{$breadcrumb.title}">
				<span itemprop="name">{$breadcrumb.title}</span>
			</a>
{else}
			<span itemprop="name">{$breadcrumb.title}</span>
{/if}
			<meta itemprop="position" content="{($smarty.foreach.crumbs.iteration|intval + 1)}" />
		</li>
{/foreach}
{/if}
	</ol>
</div>
{if isset($smarty.get.search_query) && isset($smarty.get.results) && $smarty.get.results > 1 && isset($smarty.server.HTTP_REFERER)}
<div class="pull-right">
	<strong>
		{capture}{if isset($smarty.get.HTTP_REFERER) && $smarty.get.HTTP_REFERER}{$smarty.get.HTTP_REFERER}{elseif isset($smarty.server.HTTP_REFERER) && $smarty.server.HTTP_REFERER}{$smarty.server.HTTP_REFERER}{/if}{/capture}
		<a href="{$smarty.capture.default|escape:'html':'UTF-8'|secureReferrer|regex_replace:'/[\?|&]content_only=1/':''}" name="back">
			<i class="icon-chevron-left left"></i> {l s='Back to Search results for "%s" (%d other results)' sprintf=[$smarty.get.search_query,$smarty.get.results]}
		</a>
	</strong>
</div>
{/if}
<!-- /Breadcrumb -->

 

Edited by metacreo (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

Page with self linked clickable link in breadcrumb nav. I think it not good SEO solution. Search engines may ignore this link and keep it as dirty or it can lead to the generation of unwanted links that are perceived as duplicates, thereby losing the total weight of the page. ( --- "seo?", "SEO" and SEO! ---- "V.I. Lenin" 😄 )

Edited by metacreo (see edit history)

Share this post


Link to post
Share on other sites

  • 4 weeks later...
On 1/27/2020 at 8:11 PM, metacreo said:

OMG! module??? IMHO The right solution it change bredcrumb.tpl ONLY! All other solutions abnormal.
Here for native default-bootstrap theme ps 1.6.1.24 fully adapted for schema.org file breadcrumb.tpl

file content:

<!-- Breadcrumb -->
{if isset($smarty.capture.path)}{assign var='path' value=$smarty.capture.path}{/if}
{if !empty($path)}
{$matchCount = preg_match_all('/<a.+?href="(.+?)"[^>]*>([^<]*)<\/a>/', $path, $matches)}
{$breadcrumbs = []}
{for $i=0; $i < $matchCount; $i++}
{$breadcrumbs[] = ['url' => $matches[1][$i], 'title' => $matches[2][$i]]}
{/for}
{$match = preg_match('/>([^<]+)(?:<\/\\w+>s*)?$/', $path, $matches)}
{if !empty($matches[1])}
{$breadcrumbs[] = ['url' => '', 'title' => $matches[1]]}
{elseif !$match && !$matchCount}
{$breadcrumbs[] = ['url' => '', 'title' => $path]}
{/if}
{/if}
<div class="clearfix">
	<ol class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList">
		<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> 
			<a class="home" href="{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}" title="{l s='Return to Home'}" itemprop="item">
				<i class="icon-home"></i>
			</a>
			<meta itemprop="name" content="{l s='Home'}" />
			<meta itemprop="position" content="1" />
		</li>
{if !empty($breadcrumbs)}
{foreach from=$breadcrumbs item=breadcrumb name=crumbs}
		<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
{if !empty($breadcrumb.url)}
			<a href="{$breadcrumb.url}" itemprop="item" title="{$breadcrumb.title}">
				<span itemprop="name">{$breadcrumb.title}</span>
			</a>
{else}
			<span itemprop="name">{$breadcrumb.title}</span>
{/if}
			<meta itemprop="position" content="{($smarty.foreach.crumbs.iteration|intval + 1)}" />
		</li>
{/foreach}
{/if}
	</ol>
</div>
{if isset($smarty.get.search_query) && isset($smarty.get.results) && $smarty.get.results > 1 && isset($smarty.server.HTTP_REFERER)}
<div class="pull-right">
	<strong>
		{capture}{if isset($smarty.get.HTTP_REFERER) && $smarty.get.HTTP_REFERER}{$smarty.get.HTTP_REFERER}{elseif isset($smarty.server.HTTP_REFERER) && $smarty.server.HTTP_REFERER}{$smarty.server.HTTP_REFERER}{/if}{/capture}
		<a href="{$smarty.capture.default|escape:'html':'UTF-8'|secureReferrer|regex_replace:'/[\?|&]content_only=1/':''}" name="back">
			<i class="icon-chevron-left left"></i> {l s='Back to Search results for "%s" (%d other results)' sprintf=[$smarty.get.search_query,$smarty.get.results]}
		</a>
	</strong>
</div>
{/if}
<!-- /Breadcrumb -->

 

Hi

I have replaced my breadcrumb in version 1.6.1.3 with that of metacreo, and now I get a new error that is "the item field is missing".

Can someone help me about it. Thank you.

Share this post


Link to post
Share on other sites

35 minutes ago, Josediecinueve said:

I think you have a simple syntax error. check copied code near

{if !empty($breadcrumbs)}
{foreach from=$breadcrumbs item=breadcrumb name=crumbs}
		<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
{if !empty($breadcrumb.url)}
			<a href="{$breadcrumb.url}" itemprop="item" title="{$breadcrumb.title}">
				<span itemprop="name">{$breadcrumb.title}</span>
			</a>
{else}
			<span itemprop="name">{$breadcrumb.title}</span>
{/if}
			<meta itemprop="position" content="{($smarty.foreach.crumbs.iteration|intval + 1)}" />
		</li>
{/foreach}
{/if}
	

search by "data-gg=". I see old code fragments.
Better is just replace your file with attached file from this topic.

DO NOT FORGET to clean smarty cache after this manipulations.

Edited by metacreo (see edit history)

Share this post


Link to post
Share on other sites

<ol class="breadcrumb" itemscope="" itemtype="http://schema.org/BreadcrumbList">
  <li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem"> 
    <a class="home" href="https://joyasyrelojesonline.com/" title="Volver a Inicio" itemprop="item"> 
      <i class="icon-home"></i> 
    </a>
    <meta itemprop="name" content="Home"><meta itemprop="position" content="1">
  </li>
  <li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem"> 
    <a href="https://joyasyrelojesonline.com/27-joyas" title="JOYAS" data-gg="">
      <meta itemprop=" itemprop=" item"="" title="JOYAS"> 
      <span itemprop="name">JOYAS</span> 
    </a>
    <meta itemprop="position" content="2">  
  </li>

itemprop=" itemprop=" item"="" title=  SYNTAX

 data-gg="" OLD CODE
 

OR Maybe you need just clean cache

Share this post


Link to post
Share on other sites

No changes in browser. Do you cleaned PS smarty cache after modification ? (In backoffice Advanced Parameters > Performance Clear Cache)

To check html in browser I use Mozilla FireFox, on target page (product page) press F12. Then press ctrl+shift+C and simple click on your breadcrumb on page (Home>COMPLEMENTOS>Escritura>Hugo Boss>Recambio Bolígrafo HPR541NF Negro Punta fina). In bottom panel you can see and navigate html who server passed to browser.

Share this post


Link to post
Share on other sites

Try disable "Minify HTML" in Performance > Advanced Parameters

Then clean cache.

If html code still old, try delete breadcrubd.tpl file

After 500 error on page, put tpl file back and clean cache again.

Very strange situation on your site )))

Share this post


Link to post
Share on other sites

I see. Seem to problem in some module.
try disable yotpo module

If no success you need search of code fragment "data-gg=" in modules folder.
If you have ssh access to web-root, go to site folder and exec ( grep -rl 'data-gg=' ./ ) search command, look code path
If no ssh, download site on PC and search code by some editor Notepad++, dreamviewer, etc...

Share this post


Link to post
Share on other sites

Metacreo finally found the error.

It was a Tools.php file that I did not remember that I had created in override/classes 15 days ago, following a website that theoretically corrected the theme of breadcrumb.
I wanted to thank you for all the interest you have taken to help me.
Greetings.

Share this post


Link to post
Share on other sites

  • 2 weeks later...

Hello everyone.

I followed the instructions as described above. Google sees everything correctly and all warnings have disappeared. Unfortunately, the bread crumbs on the page look like above. One line has made a lot and I can't handle it. Could someone possibly help me.

Of course, I cleared the cache and smarty and compiled the template

Thank you.

Filip

Zrzut ekranu 2020-03-8 o 17.39.42.png

Edited by vitis-it (see edit history)

Share this post


Link to post
Share on other sites

You have too much html bugs in your template (divs in head, improperly closed tags, etc...). I recommend you first fix its. Then check product locations in categories. Check smarty variables $smarty.capture.path $breadcrumbs $matches in template. Maybe some $var have conflicts. To visually view variables and data arrays you can use:

<pre>
{$some_variabe|print_r}
</pre>

right in tpl files.

Share this post


Link to post
Share on other sites

  • 1 year later...

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
 Share

×
×
  • Create New...

Important Information

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