cwiz Posted January 21, 2020 Share Posted January 21, 2020 (edited) 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 January 21, 2020 by cwiz spelling mistake (see edit history) Link to comment Share on other sites More sharing options...
Electols Posted January 22, 2020 Share Posted January 22, 2020 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: And then after editing the breadcrumb.tpl: Victory. Link to comment Share on other sites More sharing options...
mkkorleone Posted January 22, 2020 Share Posted January 22, 2020 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 --> Link to comment Share on other sites More sharing options...
Electols Posted January 22, 2020 Share Posted January 22, 2020 Sorry no, I'm not a coder just find the solution for the default theme you'll certainly need to contact your Prestashop theme author or call a Prestashop developer to adapt it Best regards Patrick Link to comment Share on other sites More sharing options...
Daresh Posted January 22, 2020 Share Posted January 22, 2020 You can also try this module: Link to comment Share on other sites More sharing options...
mkkorleone Posted January 22, 2020 Share Posted January 22, 2020 Super this is the solution.Tnx for module. 1 Link to comment Share on other sites More sharing options...
cwiz Posted January 22, 2020 Author Share Posted January 22, 2020 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 Link to comment Share on other sites More sharing options...
metacreo Posted January 27, 2020 Share Posted January 27, 2020 (edited) 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 February 27, 2020 by metacreo (see edit history) 1 Link to comment Share on other sites More sharing options...
Daresh Posted January 27, 2020 Share Posted January 27, 2020 Yes, that's the best solution! A module may be usefull if someone would like to link also the last element of the breadcrumb. Link to comment Share on other sites More sharing options...
metacreo Posted January 27, 2020 Share Posted January 27, 2020 (edited) 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 January 27, 2020 by metacreo (see edit history) Link to comment Share on other sites More sharing options...
Josediecinueve Posted February 20, 2020 Share Posted February 20, 2020 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. Link to comment Share on other sites More sharing options...
metacreo Posted February 22, 2020 Share Posted February 22, 2020 On 2/20/2020 at 11:13 AM, Josediecinueve said: Can someone help me about it. Thank you. Please provide url who you testing. Link to comment Share on other sites More sharing options...
Josediecinueve Posted February 24, 2020 Share Posted February 24, 2020 https://joyasyrelojesonline.com/ Thank you Link to comment Share on other sites More sharing options...
metacreo Posted February 24, 2020 Share Posted February 24, 2020 (edited) 35 minutes ago, Josediecinueve said: https://joyasyrelojesonline.com/ Thank you 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 February 24, 2020 by metacreo (see edit history) Link to comment Share on other sites More sharing options...
Josediecinueve Posted February 24, 2020 Share Posted February 24, 2020 Hello, first of all thanks for your interest. In principle I do not see any difference between my code and the one that you indicate to me, anyway I have returned to copy and paste the file, I will tell you how it works. Link to comment Share on other sites More sharing options...
metacreo Posted February 24, 2020 Share Posted February 24, 2020 <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 Link to comment Share on other sites More sharing options...
Josediecinueve Posted February 25, 2020 Share Posted February 25, 2020 Where do you access to check my breadcrumb.tpl? I say it so I can do it myself and not bother you anymore. Thank you. Link to comment Share on other sites More sharing options...
metacreo Posted February 25, 2020 Share Posted February 25, 2020 Don`t worry. ))) I not have access to your files. I just looked in browser as developer. 1 Link to comment Share on other sites More sharing options...
Josediecinueve Posted February 26, 2020 Share Posted February 26, 2020 Hi Metacreo, Could you check if my breadcrumb.tpl is now correct? Could you tell me once you see the browser as a web developer what are the steps to do the check ?. It is to learn to do it myself. Thank you Link to comment Share on other sites More sharing options...
metacreo Posted February 26, 2020 Share Posted February 26, 2020 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. Link to comment Share on other sites More sharing options...
Josediecinueve Posted February 26, 2020 Share Posted February 26, 2020 Yes I cleaned cache. My version is 1.6.1.3, will it have something to do? Should the breadcrumb.tpl file be in / httpdocs / themes / default-bootstrap ?. I do not know what happens. Thank you. Link to comment Share on other sites More sharing options...
metacreo Posted February 26, 2020 Share Posted February 26, 2020 (edited) Yes, this file. /httpdocs/themes/default-bootstrap/breadcrumb.tpl I can check syntax if you sent me file. Do not set raw file, put it to zip folder or compress by another app (7-z, rar, tar, etc...) You can use PM or publish in post. Edited February 26, 2020 by metacreo (see edit history) Link to comment Share on other sites More sharing options...
Josediecinueve Posted February 27, 2020 Share Posted February 27, 2020 The file is correct, it is the annex you published, what I do not know is because it is not updated. Now I see 12 pages that return a soft 404 and I don't know why. I do not understand anything Link to comment Share on other sites More sharing options...
metacreo Posted February 27, 2020 Share Posted February 27, 2020 Download this file breadcrumb.tpl Do NOT save this file in other editors to prevent unicode standards changes. Replace your file with downloaded. Clean cache. Link to comment Share on other sites More sharing options...
Josediecinueve Posted February 27, 2020 Share Posted February 27, 2020 It remains the same metacreo, I have checked it as a developer I think there is some weird module out there that does not allow updating the code, but I have already uninstalled all the breadcrumbs and rich snippets that I had Thank you Link to comment Share on other sites More sharing options...
metacreo Posted February 27, 2020 Share Posted February 27, 2020 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 ))) Link to comment Share on other sites More sharing options...
metacreo Posted February 27, 2020 Share Posted February 27, 2020 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... Link to comment Share on other sites More sharing options...
Josediecinueve Posted February 28, 2020 Share Posted February 28, 2020 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. Link to comment Share on other sites More sharing options...
vitis-it Posted March 8, 2020 Share Posted March 8, 2020 (edited) 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 Edited March 8, 2020 by vitis-it (see edit history) Link to comment Share on other sites More sharing options...
metacreo Posted March 10, 2020 Share Posted March 10, 2020 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. Link to comment Share on other sites More sharing options...
letrof Posted July 22, 2021 Share Posted July 22, 2021 (edited) - Edited July 22, 2021 by letrof wrong topic (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now