data-vocabulary.org schema deprecated 20th Jan - changing to Schema.org

Started by briggz5d, January 27, 2020, 06:47:35 AM

Previous topic - Next topic

briggz5d

Hi guys,

I've ignored Googles webmaster warnings emails about Breadcrumbs issues detected for a few days now.
I;ve noticed a drop in landing pages and analytics also notified me of a drop in earnings. So i've made out time today to fix the depreciated schema but dont know how :D

Can someone look into this and maybe provide an easy Copy / Paste solution so i dont go messing with code doing trial and error.
Will SMF maybe role out a small fix before april 6th when the depreciated schema will no longer be accepted as google rich result feature ? 

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

briggz5d

I'm on version 2.0.15 but i see now that version .17 is available.. Let's see if that's a fix

Douglas

I'm digging into this for you, now. I'm scanning both 2.1 RC2 and 2.0.15 forums. Will report back in a second. I'll also check 2.0.17, as well.
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie / Guru / Maven / whatever)

Douglas

Okay, scanned:
2.0.15
2.0.17
2.1 RC2.

None of them, out of the box, use data-vocabulary.org (which is what's being "retired").

I would take a look at any mods or custom themes you've got installed (this eliminates SMF, itself, as the "culprit". :))
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie / Guru / Maven / whatever)

briggz5d

I Found the culprit on my custom Theme.

// Each tree item has a URL and name. Some may have extra_before and extra_after.
   foreach ($context['linktree'] as $link_num => $tree)
   {
      echo '
         <li', ($link_num == count($context['linktree']) - 1) ? ' class="last"' : '', ' itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">';

      // Show the link, including a URL if it should have one.
      echo $settings['linktree_link'] && isset($tree['url']) ? '
            <a href="' . $tree['url'] . '" itemprop="url"><span itemprop="name">' . $tree['name'] . '</span></a>' : '<span itemprop="name">' . $tree['name'] . '</span>';

      echo '
         </li>';
   }
   echo '
      </ol>';

   $shown_linktree = true;
}


Might take me the whole day to get correctly, help?

Douglas

Search for:
itemtype="http://data-vocabulary.org/Breadcrumb"

Replace with:
itemtype="http://schema.org/BreadcrumbList"

If that's the only place you've found it, the fix is rather quick and painless, and only needs to be done once. :)

Pay attention to the Breadcrumb/BreadcrumbList portion. That part is case sensitive, so make sure you copy/paste my exact code.
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie / Guru / Maven / whatever)

vbgamer45

On my forums I use this
function theme_linktree($force_show = false)
{
global $context, $settings, $options, $shown_linktree, $scripturl;

// If linktree is empty, just return - also allow an override.
if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show))
return;

echo '
<div class="navigate_section">
<ul itemscope itemtype="https://schema.org/BreadcrumbList">';

$linkpos = 1;

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
echo '
<li', ($link_num == count($context['linktree']) - 1) ? ' class="last"' : '', ' itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">';

// Show something before the link?
if (isset($tree['extra_before']))
        {
echo $tree['extra_before'];

        }
// Show the link, including a URL if it should have one.
echo $settings['linktree_link'] && isset($tree['url']) ? '
<span><a href="' . $tree['url'] . '"  itemprop="item"><span itemprop="name">' . $tree['name'] . '</span></a></span>' : '<span><a href="' . $scripturl . '"  itemprop="item"><span itemprop="name">' . $tree['name'] . '</span></a></span>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo ' »';

echo '<meta itemprop="position" content="' . $linkpos . '" />
</li>';

$linkpos++;
}
echo '
</ul>
</div>';

$shown_linktree = true;
}
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: