1

I received the mail from google saying Breadcrumbs issues detected

Warning : data-vocabulary.org schema deprecated

On research about these I came across that Starting April 6, 2020, Google will no longer support data-vocabulary.org structured data to enable rich results in Google Search. From January 20 until April 6, any data-vocabulary.org structured data on a web page will trigger a warning for the appropriate rich result type. After April 6, an error will be triggered.

My code

<li class="<?php echo $_crumbName ?>" <?php if($_crumbName == 'home'){ echo 'itemscope itemtype="http://data-vocabulary.org/Breadcrumb"'; }?>>
            <?php if($_crumbInfo['link']): ?>
                <a itemprop="url" href="<?php echo $_crumbInfo['link'] ?>" title="<?php echo $this->escapeHtml($_crumbInfo['title']) ?>">
                <span itemprop="title" class="breadcrumb_title"><?php echo $this->escapeHtml($_crumbInfo['label']) ?></span>
                </a>
            <?php elseif($_crumbInfo['last']): ?>
                <span itemprop="title">
                <strong><?php echo $this->escapeHtml($_crumbInfo['label']) ?></strong>
                </span>
            <?php else: ?>
                <?php echo $this->escapeHtml($_crumbInfo['label']) ?>
            <?php endif; ?>
            <?php if(!$_crumbInfo['last']): ?>
                <span>> </span>
            <?php endif; ?>
            </li>

How can I change data-vocabulary to schema.org

2

please update code with below code

<?php if ($crumbs && is_array($crumbs)) : ?>
    <div class="breadcrumbs">
        <ul class="items">
            <?php $i = 0;?>
            <?php foreach ($crumbs as $_crumbName => $_crumbInfo) : ?>
                <?php $i++;?>
                <li class="<?php echo $_crumbName ?>" <?php if ($_crumbInfo['link']) {
                    echo 'itemscope itemtype="http://schema.org/BreadcrumbList"';
                } ?>
                    >
                    <?php if ($_crumbInfo['link']): ?>
                        <span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
                            <a itemprop="url" href="<?php echo $_crumbInfo['link'] ?>"
                               title="<?php echo $this->escapeHtml($_crumbInfo['title']) ?>">
                                <span itemprop="name"
                                  class="breadcrumb_title"><?php echo $this->escapeHtml($_crumbInfo['label']) ?></span>
                             </a>
                            <span itemprop="position" style="display: none"><?php echo $i?></span>
                        </span>

                    <?php elseif ($_crumbInfo['last']): ?>
                        <span itemprop="name">
                            <strong><?php echo $this->escapeHtml($_crumbInfo['label']) ?></strong>
                        </span>
                    <?php else: ?>
                        <?php echo $this->escapeHtml($_crumbInfo['label']) ?>
                    <?php endif; ?>
                    <?php if (!$_crumbInfo['last']): ?>
                        <span>> </span>
                    <?php endif; ?>

                </li>
            <?php endforeach; ?>
        </ul>
    </div>
<?php endif; ?>

(source)

|improve this answer|||||
  • This works, but on some products : A value for the ratingValue field is required & One of ratingCount or reviewCount must be provided. This warning comes up on google search console – HIDDEN Jan 29 at 9:58
  • if you give me url to test than i solve it and update my answer – Jigs Parmar Jan 30 at 4:27
1

Encountered the same issue and solved it by replacing data-vocabulary schema by the schema.org schema.

Create an override of the current breadcrumbs.phtml to your own theme (example) app/design/frontend/example/default/template/page/html/breadcrumbs.phtml

my implementation

<?php if($crumbs && is_array($crumbs)): ?>
<div class="breadcrumbs">
    <ul itemscope itemtype="https://schema.org/BreadcrumbList">
        <?php $_i = 1; ?>
        <?php foreach($crumbs as $_crumbName=>$_crumbInfo): ?>
            <li class="<?php echo $_crumbName ?>" itemprop="itemListelement" itemscope itemtype="https://schema.org/ListItem">
            <?php if($_crumbInfo['link']): ?>
                <a href="<?php echo $_crumbInfo['link'] ?>" title="<?php echo $this->escapeHtml($_crumbInfo['title']) ?>" itemprop="item"><span itemprop="name"><?php echo $this->escapeHtml($_crumbInfo['label']) ?></span></a>
            <?php elseif($_crumbInfo['last']): ?>
                <a href="<?php echo $this->helper('core/url')->getCurrentUrl(); ?>" title="<?php echo $this->escapeHtml($_crumbInfo['title']) ?>" itemprop="item"><span class="last-crumb" aria-current="page" itemprop="name"><?php echo $this->escapeHtml($_crumbInfo['label']) ?></span></a>
            <?php else: ?>
                    <span itemprop="item"><span itemprop="name"><?php echo $this->escapeHtml($_crumbInfo['label']) ?></span></span>
            <?php endif; ?> 
                <meta itemprop="position" content="<?php echo $_i; ?>">
                </li>
        <?php $_i++; ?>
        <?php endforeach; ?>
    </ul>
</div>
<?php endif; ?>

|improve this answer|||||
  • Works perfectly! Issue has been solved on Magento v1.9 – HIDDEN Jan 24 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.