Google seach console - new missing id error today on breadcumb

8 months 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-->

8 months ago
I also just started getting these errors today... Anyone have any thoughts or solutions to this?
8 months 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
8 months ago
thanks for the answer, awesome. 4.2 upgrade is due on our stores, so may just hold out for this.

Cheers
Jon
8 months 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.
8 months ago
So, is this issue fixed in Nop 4.20?
8 months 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>

8 months ago
>So, is this issue fixed in Nop 4.20?
Yes.
8 months ago
Thanks!
8 months 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 :/