Navbar BreadcrumbList: A value for the id field is required

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
dimassamid
Registered User
Posts: 26
Joined: Sat Aug 25, 2007 4:55 pm

Navbar BreadcrumbList: A value for the id field is required

Post by dimassamid »

Hello!

Google Search Console sent me a message that my site navigation contains a lot of errors in a different pages. The problem with BreadcrumbList in navbar.
A value for the id field is required
I tested on a clean forum. The problem with the new navbar, which comes with the 3.3.0
There was no such error on 3.2.8
navbar error.png
Could you help me? How can I fix it?

Thanks in advance!
User avatar
GIK-Team
Registered User
Posts: 13
Joined: Wed Jan 08, 2020 4:49 pm
Name: Georgii Leoshko
Contact:

Re: Navbar BreadcrumbList: A value for the id field is required

Post by GIK-Team »

I have a similar problem
User avatar
Prosk8er
Registered User
Posts: 1487
Joined: Sun Mar 12, 2006 3:30 am
Location: Rochester, NY
Name: Tyler
Contact:

Re: Navbar BreadcrumbList: A value for the id field is required

Post by Prosk8er »

its not a specific 3.3.x problem i was getting the email on 3.2.x they probably just finally noticed it and emailed you
i got my email from them nov 20th 2019
Last edited by Mick on Fri Jan 10, 2020 3:44 pm, edited 1 time in total.
Reason: Removed unnecessary full quoting.
User avatar
jackennils
Registered User
Posts: 229
Joined: Mon Jun 01, 2009 7:48 pm

Re: Navbar BreadcrumbList: A value for the id field is required

Post by jackennils »

I fixed this in my custom style before 3.3 and now after implementing the 3.3 changes in my style it came back. Definitely a problem of 3.3.

Possible solution:

Open "navlink_header.html" in the prosilver template folder.

Find:

Code: Select all

	<ul id="nav-breadcrumbs" class="nav-breadcrumbs linklist navlinks" role="menubar">
		<!-- DEFINE $MICRODATA = ' itemtype="http://schema.org/ListItem" itemprop="itemListElement" itemscope' -->
		{% set navlink_position = 1 %}
		<!-- EVENT overall_header_breadcrumbs_before -->
		<li class="breadcrumbs" itemscope itemtype="http://schema.org/BreadcrumbList">
			<!-- IF U_SITE_HOME -->
				<span class="crumb" {$MICRODATA}><a href="{U_SITE_HOME}" itemtype="https://schema.org/Thing" itemscope itemprop="item" data-navbar-reference="home"><i class="icon fa-home fa-fw" aria-hidden="true"></i><span itemprop="name">{L_SITE_HOME}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span>
			<!-- ENDIF -->
			<!-- EVENT overall_header_breadcrumb_prepend -->
				<span class="crumb" {$MICRODATA}><a href="{U_INDEX}" itemtype="https://schema.org/Thing" itemscope itemprop="item" accesskey="h" data-navbar-reference="index"><!-- IF not U_SITE_HOME --><i class="icon fa-home fa-fw"></i><!-- ENDIF --><span itemprop="name">{L_INDEX}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span>

			<!-- BEGIN navlinks -->
				{% set NAVLINK_NAME = navlinks.BREADCRUMB_NAME | default(navlinks.FORUM_NAME) %}
				{% set NAVLINK_LINK = navlinks.U_BREADCRUMB | default(navlinks.U_VIEW_FORUM) %}
				<!-- EVENT overall_header_navlink_prepend -->
				<span class="crumb" {$MICRODATA}<!-- IF navlinks.MICRODATA --> {navlinks.MICRODATA}<!-- ENDIF -->><a href="{{ NAVLINK_LINK }}" itemtype="https://schema.org/Thing" itemscope itemprop="item"><span itemprop="name">{{ NAVLINK_NAME }}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span>
				<!-- EVENT overall_header_navlink_append -->
			<!-- END navlinks -->
			<!-- EVENT overall_header_breadcrumb_append -->
		</li>
		<!-- EVENT overall_header_breadcrumbs_after -->

		<!-- IF S_DISPLAY_SEARCH and not S_IN_SEARCH -->
			<li class="rightside responsive-search">
				<a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}" role="menuitem">
					<i class="icon fa-search fa-fw" aria-hidden="true"></i><span class="sr-only">{L_SEARCH}</span>
				</a>
			</li>
		<!-- ENDIF -->
	</ul>

Replace with:

Code: Select all

	<ul id="nav-breadcrumbs" class="nav-breadcrumbs linklist navlinks" role="menubar">
		<!-- DEFINE $MICRODATA = ' itemtype="http://schema.org/ListItem" itemprop="itemListElement" itemscope' -->
		{% set navlink_position = 1 %}
		<!-- EVENT overall_header_breadcrumbs_before -->
		<li class="breadcrumbs" itemscope itemtype="http://schema.org/BreadcrumbList">
			<!-- IF U_SITE_HOME -->
				<span class="crumb" {$MICRODATA}><a href="{U_SITE_HOME}" itemprop="item" data-navbar-reference="home"><i class="icon fa-home fa-fw" aria-hidden="true"></i><span itemprop="name">{L_SITE_HOME}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span>
			<!-- ENDIF -->
			<!-- EVENT overall_header_breadcrumb_prepend -->
				<span class="crumb" {$MICRODATA}><a href="{U_INDEX}" itemprop="item" accesskey="h" data-navbar-reference="index"><!-- IF not U_SITE_HOME --><i class="icon fa-home fa-fw"></i><!-- ENDIF --><span itemprop="name">{L_INDEX}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span>

			<!-- BEGIN navlinks -->
				{% set NAVLINK_NAME = navlinks.BREADCRUMB_NAME | default(navlinks.FORUM_NAME) %}
				{% set NAVLINK_LINK = navlinks.U_BREADCRUMB | default(navlinks.U_VIEW_FORUM) %}
				<!-- EVENT overall_header_navlink_prepend -->
				<span class="crumb" {$MICRODATA}<!-- IF navlinks.MICRODATA --> {navlinks.MICRODATA}<!-- ENDIF -->><a href="{{ NAVLINK_LINK }}" itemprop="item"><span itemprop="name">{{ NAVLINK_NAME }}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span>
				<!-- EVENT overall_header_navlink_append -->
			<!-- END navlinks -->
			<!-- EVENT overall_header_breadcrumb_append -->
		</li>
		<!-- EVENT overall_header_breadcrumbs_after -->

		<!-- IF S_DISPLAY_SEARCH and not S_IN_SEARCH -->
			<li class="rightside responsive-search">
				<a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}" role="menuitem">
					<i class="icon fa-search fa-fw" aria-hidden="true"></i><span class="sr-only">{L_SEARCH}</span>
				</a>
			</li>
		<!-- ENDIF -->
	</ul>
I basically removed the 3 instances of

Code: Select all

itemtype="https://schema.org/Thing" itemscope 
from the file and Google seems to like it.
arbsoft
Registered User
Posts: 4
Joined: Mon Mar 24, 2008 4:09 pm

Re: Navbar BreadcrumbList: A value for the id field is required

Post by arbsoft »

Check it out: https://search.google.com/test/rich-res ... zrivHMvoHg

You will see this error "Not all markup is eligible for rich results".

In order to fix it, remove "itemscope" of all occurrences of

Code: Select all

itemtype="https://schema.org/Thing" itemscope
In \styles\prosilver\template\navbar_header.html
User avatar
jackennils
Registered User
Posts: 229
Joined: Mon Jun 01, 2009 7:48 pm

Re: Navbar BreadcrumbList: A value for the id field is required

Post by jackennils »

So basically what I already posted. ;)
User avatar
david63
Registered User
Posts: 18293
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Contact:

Re: Navbar BreadcrumbList: A value for the id field is required

Post by david63 »

Has anyone posted this in the Bug Tracker?
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
User avatar
jackennils
Registered User
Posts: 229
Joined: Mon Jun 01, 2009 7:48 pm

Re: Navbar BreadcrumbList: A value for the id field is required

Post by jackennils »

I can do it if you want.
User avatar
david63
Registered User
Posts: 18293
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Contact:

Re: Navbar BreadcrumbList: A value for the id field is required

Post by david63 »

jackennils wrote:
Mon Jan 13, 2020 1:07 pm
I can do it if you want.
Somebody who knows about the problem should do it
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
User avatar
jackennils
Registered User
Posts: 229
Joined: Mon Jun 01, 2009 7:48 pm

Re: Navbar BreadcrumbList: A value for the id field is required

Post by jackennils »

Okay, I'm on it.
User avatar
mrgoldy
Development Team Member
Development Team Member
Posts: 1392
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs
Contact:

Re: Navbar BreadcrumbList: A value for the id field is required

Post by mrgoldy »

Senky wrote:poke
You might know more about this
phpBB Studio / Member of the Studio

Contributing: You can do it too! Including testing Pull Requests (PR).
phpBB Development and Testing made easy.
User avatar
3Di
Former Team Member
Posts: 16032
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Navbar BreadcrumbList: A value for the id field is required

Post by 3Di »

arbsoft wrote:
Mon Jan 13, 2020 12:42 pm
...
In order to fix it, remove "itemscope" of all occurrences of

Code: Select all

itemtype="https://schema.org/Thing" itemscope
In \styles\prosilver\template\navbar_header.html
itemscope shouldn't be removed since specifies that a block of an HTML element is about a particular item.

Let's try ... in \styles\prosilver\template\navbar_header.html

Find
<span class="crumb" {$MICRODATA}><a href="{U_SITE_HOME}"
Inline replace with
<span class="crumb" {$MICRODATA}><a href="{U_SITE_HOME}" id="{U_SITE_HOME}"

Find
<span class="crumb" {$MICRODATA}><a href="{U_INDEX}"
Inline replace with
<span class="crumb" {$MICRODATA}><a href="{U_INDEX}" id="{U_INDEX}"

Find

Code: Select all

<span class="crumb" {$MICRODATA}<!-- IF navlinks.MICRODATA --> {navlinks.MICRODATA}<!-- ENDIF -->><a href="{{ NAVLINK_LINK }}"
Inline replace with

Code: Select all

<span class="crumb" {$MICRODATA}<!-- IF navlinks.MICRODATA --> {navlinks.MICRODATA}<!-- ENDIF -->><a href="{{ NAVLINK_LINK }}" id="{{ NAVLINK_LINK }}"

I can't test it now. See: https://search.google.com/structured-data/testing-tool
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
Looking for a specific feature or alternative option? We will rock you! 🚀
Senky
Extension Customisations
Extension Customisations
Posts: 2289
Joined: Thu Apr 30, 2009 8:49 pm
Name: Jakub
Contact:

Re: Navbar BreadcrumbList: A value for the id field is required

Post by Senky »

Hmm, apparently a new specification, I tested it in the past, it passed all tests. Apparently, id can be a link, so you can just copy URL of the breadcrumb to the ID and it should work.
‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎📝‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‎‏‎‏‏‎ ‎ ‎ ‎🔔 ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‎‎ ‎ ‎ ‎ ‎ ‎ ‎‏‏‎ ‎‏‏‎ ‎ ‎🛠
Forms Extension | Browser & Mobile Notifications Extension | Mixed Content Fixer Extension
User avatar
3Di
Former Team Member
Posts: 16032
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Navbar BreadcrumbList: A value for the id field is required

Post by 3Di »

Yes, id (identifier) can be an URL, TEXT and something else I forgot.
https://schema.org/identifier

PR: https://github.com/phpbb/phpbb/pull/5836
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
Looking for a specific feature or alternative option? We will rock you! 🚀
vikingman
Registered User
Posts: 46
Joined: Sat Jan 27, 2007 1:24 am

Re: Navbar BreadcrumbList: A value for the id field is required

Post by vikingman »

Post by "3Di » Thu Jan 16, 2020 5:12 am"

Seems to work for me. Saw some error (white page with one line error message on top) upon first page reload, but then worked fine.

Google Search Console now happy and no more Breadcrumbs "missing ID" related error.
Post Reply

Return to “[3.3.x] Support Forum”