Page 1 of 2

Breadcrumb Microdata seems coded incorrectly?

Posted: Tue Feb 03, 2015 8:36 pm
by Volksdevil
I've noticed that I've been losing breadcrumb microdata since upgrading from 3.0.12 > 3.1.3.

Looking in navbar_header.html: (Made to read more easily)
<li class="small-icon icon-home breadcrumbs">
<!-- IF U_SITE_HOME --><span class="crumb"><a href="{U_SITE_HOME}"{$MICRODATA} data-navbar-reference="home">{L_SITE_HOME}</a></span><!-- ENDIF -->

<span class="crumb"><a href="{U_INDEX}" accesskey="h"{$MICRODATA} data-navbar-reference="index">{L_INDEX}</a></span>

<!-- BEGIN navlinks -->
<span class="crumb"><a href="{navlinks.U_VIEW_FORUM}"{$MICRODATA}<!-- IF navlinks.MICRODATA --> {navlinks.MICRODATA}<!-- ENDIF -->>{navlinks.FORUM_NAME}</a></span>


The above does not validate in googles structured data testing tools, both at developers and webmaster tools.
Click and enter phpbb.com/community
This gives errors for the breadcrumbs. Missing title, and missing URL! :shock:

Click to test phpBB
Zero data detected! :shock:

It seems the <span class="crumb"> needs to carry the itemtype property, and the itemprop="url", URL and Title need hard coding.

So this works, blue = moved. Red = added.
<li class="small-icon icon-home breadcrumbs">
<!-- IF U_SITE_HOME --><span class="crumb"[color=#0000FF][b]{$MICRODATA}[/b][/color]><a href="{U_SITE_HOME}" data-navbar-reference="home" [color=#BF0000][b]itemprop="url"><span itemprop="title">[/b][/color]{L_SITE_HOME}[color=#BF0000][b]</span>[/b][/color]</a></span><!-- ENDIF -->

<span class="crumb"{$MICRODATA}><a href="{U_INDEX}" accesskey="h" data-navbar-reference="index" [color=#BF0000][b]itemprop="url"><span itemprop="title">[/b][/color]{L_INDEX}[color=#BF0000][b]</span>[/b][/color]</a></span>

<!-- BEGIN navlinks -->
<span class="crumb"[color=#0000FF][b]{$MICRODATA}<!-- IF navlinks.MICRODATA --> {navlinks.MICRODATA}<!-- ENDIF -->[/b][/color]><a href="{navlinks.U_VIEW_FORUM}"[color=#BF0000] [b]itemprop="url"><span itemprop="title">[/b][/color]{navlinks.FORUM_NAME}[color=#BF0000][b]</span>[/b][/color]</a></span>


How come this is coded the way it is?

Re: Breadcrumb Microdata seems coded incorrectly?

Posted: Sat Feb 07, 2015 9:18 pm
by Volksdevil
And now my breadcrumbs are appearing/starting to appear as they should in Google! (Red). They do not show at all with the core phpBB method! (Blue)
breaddy.PNG

Re: Breadcrumb Microdata seems coded incorrectly?

Posted: Tue Feb 17, 2015 7:56 pm
by Volksdevil
OK, So I'm still having issues with this...The breadcrumb microdata validates with google after I made changes. As seen here.

But upon testing at w3.org, I receive errors like:
The itemprop attribute was specified, but the element is not a property of any item.
As seen here.

Re: Breadcrumb Microdata seems coded incorrectly?

Posted: Wed Feb 18, 2015 11:34 pm
by Noxwizard
Please report this to the bug tracker.

Re: Breadcrumb Microdata seems coded incorrectly?

Posted: Wed Feb 18, 2015 11:47 pm
by mrgtb
Volksdevil wrote:OK, So I'm still having issues with this...The breadcrumb microdata validates with google after I made changes. As seen here.

But upon testing at w3.org, I receive errors like:
The itemprop attribute was specified, but the element is not a property of any item.
As seen here.
I'm running 3.1.3 and just ran a topic on my forum through validation also, it passes HTML5 validation

Re: Breadcrumb Microdata seems coded incorrectly?

Posted: Wed Feb 18, 2015 11:53 pm
by mrgtb
<!-- BEGIN navlinks -->
<span class="crumb"><a href="{navlinks.U_VIEW_FORUM}"{$MICRODATA}<!-- IF navlinks.MICRODATA --> {navlinks.MICRODATA}<!-- ENDIF -->>{navlinks.FORUM_NAME}</a></span>
There is an error in that code above you posted. Look after that endif, you have an extra ">"

<!-- IF navlinks.MICRODATA --> {navlinks.MICRODATA}<!-- ENDIF -->>

Re: Breadcrumb Microdata seems coded incorrectly?

Posted: Wed Feb 18, 2015 11:57 pm
by DavidIQ
No that's the closing bracket for the anchor tag.

Re: Breadcrumb Microdata seems coded incorrectly?

Posted: Wed Feb 18, 2015 11:59 pm
by mrgtb
Sorry yes, it is for the: a href

Re: Breadcrumb Microdata seems coded incorrectly?

Posted: Thu Feb 19, 2015 12:07 am
by Volksdevil
Noxwizard wrote:Please report this to the bug tracker.
Sure will, I'm just trying to code a possible fix a little better although I have got it all working now :)
mrgtb wrote:
Volksdevil wrote:OK, So I'm still having issues with this...The breadcrumb microdata validates with google after I made changes. As seen here.

But upon testing at w3.org, I receive errors like:
The itemprop attribute was specified, but the element is not a property of any item.
As seen here.
I'm running 3.1.3 and just ran a topic on my forum through validation also, it passes HTML5 validation
Yeah, I found a fix for passing HTML5 Validation. All good on that front, just that Google isn't recognizing breadcrumbs properly with the core phpBB coding...They are there but missing title/url and other possibly handy tags. Breadcrumbs are now appearing for my forum in google so it's all working, just needs a little tweaking.

Re: Breadcrumb Microdata seems coded incorrectly?

Posted: Fri Sep 18, 2015 2:28 am
by Galixte de EzCom
Hi Volksdevil,

during those last months you have tested many possibilities, i guess.

What are your final changes in navbar_header.html file to display correctly the breadcrumb Microdata in Google Search, please ?

Re: Breadcrumb Microdata seems coded incorrectly?

Posted: Sun Jun 26, 2016 4:35 pm
by user5505
I've found the solution in the following guide to fully add breadcrumbs to phpbb that validates with google microdata guidlines. http://www.siteawy.com/en/tech/add-seo- ... phpbb.html

Re: Breadcrumb Microdata seems coded incorrectly?

Posted: Sun Jun 26, 2016 5:56 pm
by david63
user5505 wrote:I've found the solution in the following guide to fully add breadcrumbs to phpbb that validates with google microdata guidlines.
That link is for phpBB 3.0

Re: Breadcrumb Microdata seems coded incorrectly?

Posted: Mon Jun 27, 2016 12:07 am
by user5505
david63 wrote:
user5505 wrote:I've found the solution in the following guide to fully add breadcrumbs to phpbb that validates with google microdata guidlines.
That link is for phpBB 3.0
I've tested it on phpBB 3.1.8 worked like charm and validated using google tool.

Re: Breadcrumb Microdata seems coded incorrectly?

Posted: Mon Jun 27, 2016 2:09 am
by RMcGirr83
and with an update to that file you will lose those edits.

Re: Breadcrumb Microdata seems coded incorrectly?

Posted: Sun Jan 29, 2017 9:28 pm
by Sepp71
Just wanted to see the colours that don't appear in code sections
Volksdevil wrote:
Tue Feb 03, 2015 8:36 pm
(...)
So this works, blue = moved. Red = added.
<li class="small-icon icon-home breadcrumbs">
<!-- IF U_SITE_HOME --><span class="crumb"{$MICRODATA}><a href="{U_SITE_HOME}" data-navbar-reference="home" itemprop="url"><span itemprop="title">{L_SITE_HOME}</span></a></span><!-- ENDIF -->

<span class="crumb"{$MICRODATA}><a href="{U_INDEX}" accesskey="h" data-navbar-reference="index" itemprop="url"><span itemprop="title">{L_INDEX}</span></a></span>

<!-- BEGIN navlinks -->
<span class="crumb"{$MICRODATA}<!-- IF navlinks.MICRODATA --> {navlinks.MICRODATA}<!-- ENDIF -->><a href="{navlinks.U_VIEW_FORUM}" itemprop="url"><span itemprop="title">{navlinks.FORUM_NAME}</span></a></span>
Edit:
But it seems to be correct now in phpbb 3.1.10.

The problem I have deals with the dead urls in

Code: Select all

<!-- DEFINE $MICRODATA = ' itemtype="http://data-vocabulary.org/Breadcrumb" itemscope=""' -->
The URLs should possibly link to http://schema.org/Breadcrumb. data-vocabulary results in a 404 error.
Sepp