Breadcrumb Microdata seems coded incorrectly?

Get help with installation and running phpBB 3.1.x here. Please do not post bug reports, feature requests, or extension related questions here.
Anti-Spam Guide
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: phpBB 3.1.x is at its End of Life stage and support will NOT be provided after July 1st, 2018.
User avatar
Volksdevil
Registered User
Posts: 2414
Joined: Sun Oct 03, 2010 2:03 pm
Location: Lancashire, UK
Name: Neil
Contact:

Breadcrumb Microdata seems coded incorrectly?

Post 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?
Last edited by Mick on Thu Feb 19, 2015 10:03 am, edited 1 time in total.
Reason: Solved
My phpBB Extensions
Finally found great Website Hosting from Image KUALO!
Do NOT use 123-reg.co.uk - Incapable of running phpBB!
:ugeek: TekNeil - Streamer on Mixer | My Volkswagen Corrado G60
User avatar
Volksdevil
Registered User
Posts: 2414
Joined: Sun Oct 03, 2010 2:03 pm
Location: Lancashire, UK
Name: Neil
Contact:

Re: Breadcrumb Microdata seems coded incorrectly?

Post 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
My phpBB Extensions
Finally found great Website Hosting from Image KUALO!
Do NOT use 123-reg.co.uk - Incapable of running phpBB!
:ugeek: TekNeil - Streamer on Mixer | My Volkswagen Corrado G60
User avatar
Volksdevil
Registered User
Posts: 2414
Joined: Sun Oct 03, 2010 2:03 pm
Location: Lancashire, UK
Name: Neil
Contact:

Re: Breadcrumb Microdata seems coded incorrectly?

Post 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.
My phpBB Extensions
Finally found great Website Hosting from Image KUALO!
Do NOT use 123-reg.co.uk - Incapable of running phpBB!
:ugeek: TekNeil - Streamer on Mixer | My Volkswagen Corrado G60
User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10406
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster
Contact:

Re: Breadcrumb Microdata seems coded incorrectly?

Post by Noxwizard »

Please report this to the bug tracker.
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.
User avatar
mrgtb
Registered User
Posts: 603
Joined: Wed Oct 03, 2007 10:51 am

Re: Breadcrumb Microdata seems coded incorrectly?

Post 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
User avatar
mrgtb
Registered User
Posts: 603
Joined: Wed Oct 03, 2007 10:51 am

Re: Breadcrumb Microdata seems coded incorrectly?

Post 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 -->>
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17314
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Breadcrumb Microdata seems coded incorrectly?

Post by DavidIQ »

No that's the closing bracket for the anchor tag.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.
User avatar
mrgtb
Registered User
Posts: 603
Joined: Wed Oct 03, 2007 10:51 am

Re: Breadcrumb Microdata seems coded incorrectly?

Post by mrgtb »

Sorry yes, it is for the: a href
User avatar
Volksdevil
Registered User
Posts: 2414
Joined: Sun Oct 03, 2010 2:03 pm
Location: Lancashire, UK
Name: Neil
Contact:

Re: Breadcrumb Microdata seems coded incorrectly?

Post 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.
My phpBB Extensions
Finally found great Website Hosting from Image KUALO!
Do NOT use 123-reg.co.uk - Incapable of running phpBB!
:ugeek: TekNeil - Streamer on Mixer | My Volkswagen Corrado G60
User avatar
Galixte de EzCom
Registered User
Posts: 1090
Joined: Mon Oct 04, 2004 11:14 pm
Location: France
Name: Raphaël M.
Contact:

Re: Breadcrumb Microdata seems coded incorrectly?

Post 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 ?
Communau EzCom
📖 « Traductions d’extensions & styles pour phpBB 3.2.x & 3.3.x ».
📋 Lists of all extensions identified for phpBB 3.1.x & 3.2.x.
📋 Lists of all styles identified for phpBB 3.1.x & 3.2.x.
Image Tu as un forum et tu veux aussi un site web ? Regarde par ici.
user5505
Registered User
Posts: 7
Joined: Sat Oct 10, 2015 6:12 pm

Re: Breadcrumb Microdata seems coded incorrectly?

Post 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
User avatar
david63
Registered User
Posts: 18302
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Contact:

Re: Breadcrumb Microdata seems coded incorrectly?

Post 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
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored
user5505
Registered User
Posts: 7
Joined: Sat Oct 10, 2015 6:12 pm

Re: Breadcrumb Microdata seems coded incorrectly?

Post 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.
User avatar
RMcGirr83
Former Team Member
Posts: 21472
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Breadcrumb Microdata seems coded incorrectly?

Post by RMcGirr83 »

and with an update to that file you will lose those edits.
Appreciate the extensions/mods/support then buy me a beerImage
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Sepp71
Registered User
Posts: 78
Joined: Sat Sep 06, 2008 11:32 pm
Location: Germany

Re: Breadcrumb Microdata seems coded incorrectly?

Post 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
Locked

Return to “[3.1.x] Support Forum”