Here is my solution. I really hated modifying the original code but for what’s it’s worth, it now works correctly.
1. Open breadcrumb_navxt_class.php for editing.
2. In function display_nested
replace this block:
if($mode === 'rdfa')
{
//Start up the recursive engine
$trail_str = sprintf('<%1$s typeof="v:Breadcrumb">%2$s %3$s</%1$s>', $tag, $breadcrumb->assemble($linked), $this->nested_loop($linked, $tag, $mode));
}
else
{
//Start up the recursive engine
$trail_str = sprintf('%2$s %3$s', $tag, $breadcrumb->assemble($linked), $this->nested_loop($linked, $tag, $mode));
}
with this one:
//Start up the recursive engine
$trail_str = $this->nested_loop($linked, $tag, $mode);
3. In function nested_loop
replace this block:
if($mode === 'rdfa')
{
return sprintf('%1$s<%2$s rel="v:child"><%2$s typeof="v:Breadcrumb">%3$s%4$s</%2$s></%2$s>', $this->opt['separator'], $tag, $breadcrumb->assemble($linked), $this->nested_loop($linked, $tag, $mode));
}
else
{
return sprintf('%1$s<%2$s itemprop="child" itemscope itemtype="https://data-vocabulary.org/Breadcrumb">%3$s%4$s</%2$s>', $this->opt['separator'], $tag, $breadcrumb->assemble($linked), $this->nested_loop($linked, $tag, $mode));
}
with this one:
$separator = '';
$rel = '';
if ($key !== count($this->trail) - 1)
{
$separator = $this->opt['separator'];
$rel = ($mode === 'rdfa') ? 'rel="v:child"' : 'itemprop="child"';
}
if($mode === 'rdfa')
{
return sprintf('%1$s<%2$s ' . $rel . '><%2$s typeof="v:Breadcrumb">%3$s%4$s</%2$s></%2$s>', $separator, $tag, $breadcrumb->assemble($linked), $this->nested_loop($linked, $tag, $mode));
}
else
{
return sprintf('%1$s<%2$s ' . $rel . ' itemscope itemtype="https://data-vocabulary.org/Breadcrumb">%3$s%4$s</%2$s>', $separator, $tag, $breadcrumb->assemble($linked), $this->nested_loop($linked, $tag, $mode));
}
Hope this helps! I don’t claim this to be the “proper” fix, but it does the job until mtekk comes up with a permanent solution.