Olena123 Posted September 30, 2019 Share Posted September 30, 2019 Hello. I am using Prestashop 1.7.6.0. I have got google error: Breadcrumbs : Either "name" or "item.name" should be specified. Someone knoe how to fix it? Thanks! Link to comment Share on other sites More sharing options...
Joyplaz Posted September 30, 2019 Share Posted September 30, 2019 I have the same issue. If you find a fix, please let me know. Link to comment Share on other sites More sharing options...
JBW Posted October 1, 2019 Share Posted October 1, 2019 This is fixed here and will go-live with 1.7.7. https://github.com/PrestaShop/PrestaShop/issues/15302 Link to comment Share on other sites More sharing options...
Joyplaz Posted October 1, 2019 Share Posted October 1, 2019 I went to the link, but I'm not seeing how to fix it. I'm not sure when the launch date is for 1.7.7, but I'd like to get rid of the google error as soon as possible. So the question is: how can I fix this now? Link to comment Share on other sites More sharing options...
Olena123 Posted October 1, 2019 Author Share Posted October 1, 2019 Hi. I Changed my breadcrumb.tpl file like in this post: https://github.com/PrestaShop/PrestaShop/pull/15632/files So now I'm waiting for validation result. Link to comment Share on other sites More sharing options...
Joyplaz Posted October 1, 2019 Share Posted October 1, 2019 Ok, here's the code from the github link... <a itemprop="item" href="{$path.url}"><span itemprop="name">{$path.title}</span></a> <meta itemprop="position" content="{$smarty.foreach.breadcrumb.iteration}"> </li> {else} {elseif isset($path.title)} <li> <span>{$path.title}</span> </li> They suggest adding from the "else" down. But is there an "if" statement that the "else" is supposed to go with? I'm not seeing "if" anywhere. Link to comment Share on other sites More sharing options...
Olena123 Posted October 1, 2019 Author Share Posted October 1, 2019 thisi is my final code: <nav data-depth="{$breadcrumb.count}" class="breadcrumb hidden-sm-down"> <ol itemscope itemtype="http://schema.org/BreadcrumbList"> {block name='breadcrumb'} {foreach from=$breadcrumb.links item=path name=breadcrumb} {block name='breadcrumb_item'} {if not $smarty.foreach.breadcrumb.last} <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> <a itemprop="item" href="{$path.url}"><span itemprop="name">{$path.title}</span></a> <meta itemprop="position" content="{$smarty.foreach.breadcrumb.iteration}"> </li> {elseif isset($path.title)} <li> <span>{$path.title}</span> </li> {/if} {/block} {/foreach} {/block} </ol> </nav> 1 1 Link to comment Share on other sites More sharing options...
Olena123 Posted October 22, 2019 Author Share Posted October 22, 2019 The validation is failed:( Does anyone has a solution? Thanks! Link to comment Share on other sites More sharing options...
abdullah Posted October 23, 2019 Share Posted October 23, 2019 Hello Is there any solution to this issue? Link to comment Share on other sites More sharing options...
Joyplaz Posted October 25, 2019 Share Posted October 25, 2019 On 10/1/2019 at 12:02 PM, OlenaMokra said: thisi is my final code: <nav data-depth="{$breadcrumb.count}" class="breadcrumb hidden-sm-down"> <ol itemscope itemtype="http://schema.org/BreadcrumbList"> {block name='breadcrumb'} {foreach from=$breadcrumb.links item=path name=breadcrumb} {block name='breadcrumb_item'} {if not $smarty.foreach.breadcrumb.last} <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> <a itemprop="item" href="{$path.url}"><span itemprop="name">{$path.title}</span></a> <meta itemprop="position" content="{$smarty.foreach.breadcrumb.iteration}"> </li> {elseif isset($path.title)} <li> <span>{$path.title}</span> </li> {/if} {/block} {/foreach} {/block} </ol> </nav> OlenaMokra, your code worked fine for me. Validation passed. Link to comment Share on other sites More sharing options...
quercus Posted December 5, 2019 Share Posted December 5, 2019 I am having the same issue. The fix above seems to be for the default theme. I am using another theme and the breadcrumb.tpl file in my theme looks very different. I am assuming that prestashop will use the breadcrumb.tpl file (as described above) from the active theme? Can anyone shine some light on this please. Thanks Link to comment Share on other sites More sharing options...
JBW Posted December 6, 2019 Share Posted December 6, 2019 You should contact your theme developer and ask them to fix it - if you post your code here we can help to fix it but there is the risk it gets overwritten with further theme updates (unless you are using a child theme) Link to comment Share on other sites More sharing options...
barati_a Posted December 29, 2019 Share Posted December 29, 2019 Hi ; I changed my file like this but now I have this error Missing field "itemListElement" How can I solve this problem? where do I change this Item? tnx; Link to comment Share on other sites More sharing options...
SnapChatScore Posted January 21, 2020 Share Posted January 21, 2020 On 12/29/2019 at 8:18 PM, barati_a said: Hi ; I changed my file like this but now I have this error Missing field "itemListElement" How can I solve this problem? where do I change this Item? tnx; I have this same issue how did you fix it? Link to comment Share on other sites More sharing options...
Ehsanai Posted January 22, 2020 Share Posted January 22, 2020 Hi, I have same issues with 1.7.6.1 and panda sunnytoo theme. please check it: https://zibama.com/ I change something but I don't know it's correct! Link to comment Share on other sites More sharing options...
Skullz0r Posted April 28, 2020 Share Posted April 28, 2020 On 12/29/2019 at 8:18 PM, barati_a said: Hi ; I changed my file like this but now I have this error Missing field "itemListElement" How can I solve this problem? where do I change this Item? tnx; Same problem here one 1.7.6.4, anyone got a solution? Got standard theme btw... Link to comment Share on other sites More sharing options...
khemia Posted July 15, 2020 Share Posted July 15, 2020 Missing field "itemListElement" 1.7.6.5 Link to comment Share on other sites More sharing options...
Mole Sounds Posted October 12, 2020 Share Posted October 12, 2020 Hello, My site has been running for several months and no issues as such. I have recently received the Google Search Console error as referred to here. I have changed the code as in several suggestions but none of it works for me. I am using a theme called Angar on 1.7.6.1. Has a fix or mod that definitely works been published anywhere? Many thanks Link to comment Share on other sites More sharing options...
Peter Liska Posted November 14, 2020 Share Posted November 14, 2020 (edited) On 12/29/2019 at 8:18 PM, barati_a said: Missing field "itemListElement" How can I solve this problem? where do I change this Item? It looks like this problem occurs only at pages with (useless) single breadcrumb. Because, there is no (navigation) itemListElement item. Like for example: home page, new products, prices drop ... If you do not need this (useless) single breadcrumb on these pages you can do something like this in your theme file \templates\_partials\breadcrumb.tpl {if $breadcrumb.count > 1} <nav data-depth="{$breadcrumb.count}" class="breadcrumb hidden-sm-down"> <ol itemscope itemtype="http://schema.org/BreadcrumbList"> ... </ol> </nav> {/if} Edited November 14, 2020 by Peter Liska (see edit history) 1 2 Link to comment Share on other sites More sharing options...
RaymondSt Posted November 14, 2020 Share Posted November 14, 2020 Nice it works! 3 hours ago, Peter Liska said: It looks like this problem occurs only at pages with (useless) single breadcrumb. Because, there is no (navigation) itemListElement item. Like for example: home page, new products, prices drop ... If you do not need this (useless) single breadcrumb on these pages you can do something like this in your theme file \templates\_partials\breadcrumb.tpl {if $breadcrumb.count > 1} <nav data-depth="{$breadcrumb.count}" class="breadcrumb hidden-sm-down"> <ol itemscope itemtype="http://schema.org/BreadcrumbList"> ... </ol> </nav> {/if} 1 Link to comment Share on other sites More sharing options...
MrsDusty100 Posted November 27, 2020 Share Posted November 27, 2020 On 11/14/2020 at 6:45 PM, RaymondSt said: Nice it works! Works for me too. I have been trying to fix this for ages. My code now looks like this: {if $breadcrumb.count > 1} <nav data-depth="{$breadcrumb.count}" class="breadcrumb hidden-sm-down"> <ol itemscope itemtype="http://schema.org/BreadcrumbList"> {block name='breadcrumb'} {foreach from=$breadcrumb.links item=path name=breadcrumb} {block name='breadcrumb_item'} {if not $smarty.foreach.breadcrumb.last} <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> <a itemprop="item" href="{$path.url}"><span itemprop="name">{$path.title}</span></a> <meta itemprop="position" content="{$smarty.foreach.breadcrumb.iteration}"> </li> {elseif isset($path.title)} <li> <span>{$path.title}</span> </li> {/if} {/block} {/foreach} {/block} </ol> </nav> {/if} 2 Link to comment Share on other sites More sharing options...
Molina111 Posted February 21, 2021 Share Posted February 21, 2021 Bonjour, je viens d'utiliser la modif. 9a foctionne. Un grand merci 1 Link to comment Share on other sites More sharing options...
Molina111 Posted February 22, 2021 Share Posted February 22, 2021 Bonsoir, je retire ce que j'ai écrit plus tôt. Mon site était hs après vérification. Je mets le debugger message. (1/1) SmartyCompilerException Syntax error in template "file:/home/lessolei/les3soleils.com/themes/classic/templates/_partials/breadcrumb.tpl" on line 48 "{/if}" unexpected closing tag in smarty_internal_templatecompilerbase.php line 48 at Smarty_Internal_TemplateCompilerBase->trigger_template_error('unexpected closing tag', 48, true)in smarty_internal_compilebase.php line 200 at Smarty_Internal_CompileBase->closeTag(object(Smarty_Internal_SmartyTemplateCompiler), array('if', 'else', 'elseif'))in smarty_internal_compile_if.php line 200 at Smarty_Internal_Compile_Ifclose->compile(array(), object(Smarty_Internal_SmartyTemplateCompiler), array(), null, null)in smarty_internal_templatecompilerbase.php line 764 at Smarty_Internal_TemplateCompilerBase->callTagCompiler('ifclose', array(), array())in smarty_internal_templatecompilerbase.php line 1493 at Smarty_Internal_TemplateCompilerBase->compileTag2('ifclose', array(), array())in smarty_internal_templatecompilerbase.php line 565 at Smarty_Internal_TemplateCompilerBase->compileTag('ifclose', array())in smarty_internal_templateparser.php line 2468 at Smarty_Internal_Templateparser->yy_r45()in smarty_internal_templateparser.php line 3383 at Smarty_Internal_Templateparser->yy_reduce(45)in smarty_internal_templateparser.php line 3479 at Smarty_Internal_Templateparser->doParse(5, '')in smarty_internal_smartytemplatecompiler.php line 128 at Smarty_Internal_SmartyTemplateCompiler->doCompile('{** * 2007-2019 PrestaShop and Contributors * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License 3.0 (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: * https://opensource.org/licenses/AFL-3.0 * 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 https://www.prestashop.com for more information. * * @author PrestaShop SA <[email protected]> * @copyright 2007-2019 PrestaShop SA and Contributors * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) * International Registered Trademark & Property of PrestaShop SA *}if $breadcrumb.count > 1}<nav data-depth="{$breadcrumb.count}" class="breadcrumb hidden-sm-down"> <ol itemscope itemtype="http://schema.org/BreadcrumbList"> {block name=\'breadcrumb\'} {foreach from=$breadcrumb.links item=path name=breadcrumb} {block name=\'breadcrumb_item\'} {if not $smarty.foreach.breadcrumb.last} <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> <a itemprop="item" href="{$path.url}"><span itemprop="name">{$path.title}</span></a> <meta itemprop="position" content="{$smarty.foreach.breadcrumb.iteration}"> </li> {elseif isset($path.title)} <li> <span>{$path.title}</span> </li> {/if} {/block} {/foreach} {/block} </ol></nav>{/if}', true)in smarty_internal_templatecompilerbase.php line 481 at Smarty_Internal_TemplateCompilerBase->compileTemplateSource(object(SmartyDevTemplate), false, null)in smarty_internal_templatecompilerbase.php line 404 at Smarty_Internal_TemplateCompilerBase->compileTemplate(object(SmartyDevTemplate))in smarty_template_compiled.php line 184 at Smarty_Template_Compiled->compileTemplateSource(object(SmartyDevTemplate))in smarty_template_compiled.php line 141 at Smarty_Template_Compiled->process(object(SmartyDevTemplate))in smarty_template_compiled.php line 105 at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216 at Smarty_Internal_Template->render()in smarty_internal_template.php line 385 at Smarty_Internal_Template->_subTemplateRender('file:_partials/breadcrumb.tpl', null, 'layouts/layout-left-column.tpl', 0, 3600, array(), 0, false)in f87cacf2af109f8d1eb7a32c483b03d704f7dc32_2.file.layout-both-columns.tpl.php line 224 at Block_19837038716034269fd9fb15_15189800->callBlock(object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 248 at Smarty_Internal_Runtime_Inheritance->callBlock(object(Block_19837038716034269fd9fb15_15189800), object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 184 at Smarty_Internal_Runtime_Inheritance->process(object(SmartyDevTemplate), object(Block_19837038716034269fd9fb15_15189800))in smarty_internal_runtime_inheritance.php line 156 at Smarty_Internal_Runtime_Inheritance->instanceBlock(object(SmartyDevTemplate), 'Block_19837038716034269fd9fb15_15189800', 'breadcrumb')in f87cacf2af109f8d1eb7a32c483b03d704f7dc32_2.file.layout-both-columns.tpl.php line 77 at content_6034269fdaa946_01780921(object(SmartyDevTemplate))in smarty_template_resource_base.php line 123 at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(SmartyDevTemplate))in smarty_template_compiled.php line 114 at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216 at Smarty_Internal_Template->render()in smarty_internal_template.php line 385 at Smarty_Internal_Template->_subTemplateRender('layouts/layout-both-columns.tpl', null, 'layouts/layout-left-column.tpl', 0, 3600, array(), 2, false, null, null)in smarty_internal_runtime_inheritance.php line 125 at Smarty_Internal_Runtime_Inheritance->endChild(object(SmartyDevTemplate), 'layouts/layout-both-columns.tpl')in 7b1bf3961dee73d43039bcedf28896f8429c3255_2.file.layout-left-column.tpl.php line 38 at content_6034269fd7bad0_83635272(object(SmartyDevTemplate))in smarty_template_resource_base.php line 123 at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(SmartyDevTemplate))in smarty_template_compiled.php line 114 at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216 at Smarty_Internal_Template->render()in smarty_internal_template.php line 385 at Smarty_Internal_Template->_subTemplateRender('layouts/layout-left-column.tpl', null, 'layouts/layout-left-column.tpl', 0, 3600, array(), 2, false, null, null)in smarty_internal_runtime_inheritance.php line 125 at Smarty_Internal_Runtime_Inheritance->endChild(object(SmartyDevTemplate), 'layouts/layout-left-column.tpl')in a3759c5cd2be4ac2e8d10a70f3d6dbae226183d4_2.file.page.tpl.php line 33 at content_6034269fd58de5_24237178(object(SmartyDevTemplate))in smarty_template_resource_base.php line 123 at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(SmartyDevTemplate))in smarty_template_compiled.php line 114 at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216 at Smarty_Internal_Template->render()in smarty_internal_template.php line 385 at Smarty_Internal_Template->_subTemplateRender('page.tpl', null, 'layouts/layout-left-column.tpl', 0, 3600, array(), 2, false, null, null)in smarty_internal_runtime_inheritance.php line 125 at Smarty_Internal_Runtime_Inheritance->endChild(object(SmartyDevTemplate), 'page.tpl')in 96125b007d1a618aeb0b8d2b1b1065bcf124ca17_2.file.index.tpl.php line 33 at content_6034269fd35fa9_39574344(object(SmartyDevTemplate))in smarty_template_resource_base.php line 123 at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(SmartyDevTemplate))in smarty_template_compiled.php line 114 at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216 at Smarty_Internal_Template->render(false, 0)in smarty_internal_templatebase.php line 232 at Smarty_Internal_TemplateBase->_execute(object(SmartyDevTemplate), null, 'layouts/layout-left-column.tpl', null, 0)in smarty_internal_templatebase.php line 116 at Smarty_Internal_TemplateBase->fetch('index.tpl', null, 'layouts/layout-left-column.tpl', null, false, true, false)in SmartyDev.php line 40 at SmartyDev->fetch('index.tpl', null, 'layouts/layout-left-column.tpl')in FrontController.php line 683 at FrontControllerCore->smartyOutputContent('index.tpl')in FrontController.php line 667 at FrontControllerCore->display()in Controller.php line 312 at ControllerCore->run()in Dispatcher.php line 515 at DispatcherCore->dispatch()in index.php line 28 si quelqu'un peut m'aider., je remercie d'avance . mon prestashop est 1.7. Philippe Link to comment Share on other sites More sharing options...
Peter Liska Posted February 23, 2021 Share Posted February 23, 2021 (edited) On 2/22/2021 at 11:06 PM, Molina111 said: Bonsoir, je retire ce que j'ai écrit plus tôt. Mon site était hs après vérification. Je mets le debugger message. It would be nice to show us original vs. actual content of the file that you have changed. And this is International community (English) !!! Edited February 24, 2021 by Peter Liska (see edit history) Link to comment Share on other sites More sharing options...
canapassion Posted April 5, 2021 Share Posted April 5, 2021 On 11/14/2020 at 4:18 PM, Peter Liska said: It looks like this problem occurs only at pages with (useless) single breadcrumb. Because, there is no (navigation) itemListElement item. Like for example: home page, new products, prices drop ... If you do not need this (useless) single breadcrumb on these pages you can do something like this in your theme file \templates\_partials\breadcrumb.tpl {if $breadcrumb.count > 1} <nav data-depth="{$breadcrumb.count}" class="breadcrumb hidden-sm-down"> <ol itemscope itemtype="http://schema.org/BreadcrumbList"> ... </ol> </nav> {/if} Hello, even if your solution works for the purpose of this thread it "breaks" mu cart and checkout page because in those pages the breadcrumbs tag is needed in order to sho the layout correctly. It is possible to add another condition in order to avoi the if in order and checkout page? Regards, Vincenzo. Link to comment Share on other sites More sharing options...
mirkodescalchi Posted March 3, 2022 Share Posted March 3, 2022 (edited) On 10/1/2019 at 12:02 PM, OlenaMokra said: thisi is my final code: <nav data-depth="{$breadcrumb.count}" class="breadcrumb hidden-sm-down"> <ol itemscope itemtype="http://schema.org/BreadcrumbList"> {block name='breadcrumb'} {foreach from=$breadcrumb.links item=path name=breadcrumb} {block name='breadcrumb_item'} {if not $smarty.foreach.breadcrumb.last} <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> <a itemprop="item" href="{$path.url}"><span itemprop="name">{$path.title}</span></a> <meta itemprop="position" content="{$smarty.foreach.breadcrumb.iteration}"> </li> {elseif isset($path.title)} <li> <span>{$path.title}</span> </li> {/if} {/block} {/foreach} {/block} </ol> </nav> Fantastic! Work fine for my shop (Presta 1.7.8.3). Tks so much! Edited March 3, 2022 by mirkodescalchi (see edit history) Link to comment Share on other sites More sharing options...
Tomi14 Posted August 10, 2022 Share Posted August 10, 2022 (edited) If I trying to use this, it change patch in every left upper corner on every page, from: "mypage / category / product name" for something like this list: 1: my page 2: category 3: product name Edited August 10, 2022 by Tomi14 (see edit history) Link to comment Share on other sites More sharing options...
Kamel3 Posted October 13, 2022 Share Posted October 13, 2022 Here is short code <a itemprop="item" href="{$path.url}"><span itemprop="name">{$path.title}</span></a> <meta itemprop="position" content="{$smarty.foreach.breadcrumb.iteration}"> </li> {else} {elseif isset($path.title)} <li> <span>{$path.title}</span> </li> If you need still help, Contact me, i will fix live 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