Google seach console - new missing id error today on breadcumb

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
Anyone else seen this?

Breadcrumbs > Missing field "id"

apparently the error is here in this block, just before end of product breadcrumb




    
                <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
                    <strong class="current-item" itemprop="name">Demonia V-Creeper-510 Black Vegan Leather, 2 inch Platform Court Pump Shoes</strong>
                    <span itemprop="item" itemscope itemtype="http://schema.org/Thing">
                        <link itemprop="url" href="/pleaser-usa-demonia-v-creeper-510-black-vegan-leather-2-inch-platform-court-pump-shoes">
                    </span>
                    <meta itemprop="position" content="3" />
                    
                </li>
            </ul>
    </div>


            <div class="master-column-wrapper">
            <div class="center-1">
    
    
<!--product breadcrumb-->

4 years ago
I also just started getting these errors today... Anyone have any thoughts or solutions to this?
4 years ago
Update your _ProductBreadcrumb.cshtml in views for product name to this


<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
                        <a href="@Url.RouteUrl("Category", new { SeName = category.SeName })" itemprop="item">
                            <span itemprop="name">@category.Name</span>
                        </a>
                        <span class="delimiter">@breadcrumbDelimiter</span>
                        <meta itemprop="position" content="@position" />
                    </li>


this is fixed in nop version 4.20
4 years ago
thanks for the answer, awesome. 4.2 upgrade is due on our stores, so may just hold out for this.

Cheers
Jon
4 years ago
No you are not  right.
The problem is in the last element in breadcumb list (the category tree  + product URL).
This element (product Url) doesn't have the link because it's a link to itself.

Open this file _ProductBreadcrumb.cshtml

Old code for nop 4.10 (not 4.20 has another HTML elements)


                    <span itemprop="item" itemscope itemtype="http://schema.org/Thing">
                        <link itemprop="url" href="@Url.RouteUrl("Product", new { SeName = Model.ProductSeName })">
                    </span>


new code

                    <span itemprop="item" itemscope itemtype="http://schema.org/Thing" id="@Url.RouteUrl("Product", new { SeName = Model.ProductSeName })">
                    </span>



Replace this line >link itemprop="url" href  with id.
4 years ago
So, is this issue fixed in Nop 4.20?
4 years ago
Thank you foxnetsoft

Also need to update

CategoryTemplate.ProductsInGridOrLines for catoegories, or any category template files derived/copied from this. Also themes may override CategoryTemplate.ProductsInGridOrLines

replace.........



<span itemprop="item" itemscope itemtype="http://schema.org/Thing">
                            <link itemprop="url" href="@Url.RouteUrl("Category", new {SeName = cat.SeName})" />
                        </span>


with........



<span itemprop="item" itemscope itemtype="http://schema.org/Thing" id="@Url.RouteUrl("Category", new {SeName = cat.SeName})">
                        </span>

4 years ago
>So, is this issue fixed in Nop 4.20?
Yes.
4 years ago
Thanks!
4 years ago
foxnetsoft wrote:
No you are not  right.
The problem is in the last element in breadcumb list (the category tree  + product URL).
This element (product Url) doesn't have the link because it's a link to itself.

Open this file _ProductBreadcrumb.cshtml

Old code for nop 4.10 (not 4.20 has another HTML elements)


                    <span itemprop="item" itemscope itemtype="http://schema.org/Thing">
                        <link itemprop="url" href="@Url.RouteUrl("Product", new { SeName = Model.ProductSeName })">
                    </span>


new code

                    <span itemprop="item" itemscope itemtype="http://schema.org/Thing" id="@Url.RouteUrl("Product", new { SeName = Model.ProductSeName })">
                    </span>



Replace this line >link itemprop="url" href  with id.


Hi! so in 4.10 code should looks like below?
<span itemprop="item" itemscope itemtype="http://schema.org/Thing">
                        <link itemprop="id" href="@Url.RouteUrl("Product", new { SeName = Model.ProductSeName })">
                    </span>

Sorry i'm not a programmer :/
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.