Google Search Console errors
Google Search Console errors
In the last couple of days I have been receiving Search Console error reports on all my CMSimple sites( except 1)
It says "Fix Breadcrumbs Markup"
I dont receive the error on a site that is at 1.6.7 but on all sites with 1.7.2
I have looked at the generated locator code in the Google Structured Data testing Tool and it throws up errors.
position: A value for the position field is required
and
item: A value for the item field is required
Looking at the code it seems there is a </a> in the wrong place (moving it fixes the position error)
and on the last item in a list the <a property="item" typeof="WebPage" href="XXX"> is missing altogether.
I assume the error is in function locator()
B
It says "Fix Breadcrumbs Markup"
I dont receive the error on a site that is at 1.6.7 but on all sites with 1.7.2
I have looked at the generated locator code in the Google Structured Data testing Tool and it throws up errors.
position: A value for the position field is required
and
item: A value for the item field is required
Looking at the code it seems there is a </a> in the wrong place (moving it fixes the position error)
and on the last item in a list the <a property="item" typeof="WebPage" href="XXX"> is missing altogether.
I assume the error is in function locator()
B
-
- Posts: 68
- Joined: Fri Apr 16, 2010 4:19 pm
- Location: Germany/Franconia
Re: Google Search Console errors
"me too" !
The "error" is function locator.
Is there a solution?
Thanks in advance
Jochen
The "error" is function locator.
Is there a solution?
Thanks in advance
Jochen
leberecht.net | keep it simple, or fail
Re: Google Search Console errors
This seems to be the case in tplfuncs.php (Example-Page of the mentioned errors).
The </a> tag should be moved and inserted before <meta property="position" content="...>.
And also the last entry in the breadcrumb navigation must be linked to fix all errors.
„Bevor du den Pfeil der Wahrheit abschießt, tauche die Spitze in Honig!“ Ludwig's XH-Templates for MultiPage & OnePage
Re: Google Search Console errors
After a bit of experimentation this seems to work.I hope its valid
Ive put the <\a> in at line 11 and taken out the -1 at line 2. You get a link on every breadcrumb including the last one.
There is some code in there which doesnt need to be there but not great at coding so not sure what does what.
B
Code: Select all
function locator()
{
$breadcrumbs = XH_getLocatorModel();
$last = count($breadcrumbs);
$html = '<span vocab="http://schema.org/" typeof="BreadcrumbList">';
foreach ($breadcrumbs as $i => $breadcrumb) {
list($title, $url) = $breadcrumb;
if ($i > 0) {
$html .= ' > ';
}
$html .= '<span property="itemListElement" typeof="ListItem">';
$inner = '<span property="name">' . $title
. '</span></a><meta property="position" content="'. ($i + 1) . '">';
if (isset($url) && $i < $last) {
$html .= '<a property="item" typeof="WebPage" href="' . $url . '">'
. $inner . '</a>';
} else {
$html .= $inner;
}
$html .= '</span>';
}
$html .= '</span>';
return $html;
}
There is some code in there which doesnt need to be there but not great at coding so not sure what does what.
B
Re: Google Search Console errors
Indeed. For some reason I missed that `position` is meant to be a sibling of `item`, but not a child of it.
Well, actually linking to the page you're already on is something we didn't intend to do. Of course, this could be changed, but it seems to me that Google might not need an actual link, but a <span> would also do.
So tentatively, I suggest this patch. The testing tool appears to be satisfied with that.
PS: fun stuff (or maybe not so funny – could have had already been fixed).
Christoph M. Becker – Plugins for CMSimple_XH
Re: Google Search Console errors
That worked thanks
Just heard from google that all is well.
Brett
Just heard from google that all is well.
Brett
Re: Google Search Console errors
With the code changes of GitHub there are more problems than before.
However almost exclusively in connection with OGra_XH and additionally with the specification of <link rel="alternate" hreflang.
Where is the error now? Breadcrump or OGra_XH?
before:
https://olaf.penschke.net/?CMSimple_XH/ ... -Textdatei
Brand
0 FEHLER
0 WARNUNGEN
1 ELEMENT
WebPage
0 FEHLER
0 WARNUNGEN
1 ELEMENT
SoftwareApplication
0 FEHLER
1 WARNUNG
1 ELEMENT
BreadcrumbList
4 FEHLER
0 WARNUNGEN
1 ELEMENT
after:
Brand
0 FEHLER
0 WARNUNGEN
1 ELEMENT
WebPage
0 FEHLER
0 WARNUNGEN
1 ELEMENT
SoftwareApplication
0 FEHLER
1 WARNUNG
1 ELEMENT
BreadcrumbList
15 FEHLER
0 WARNUNGEN
1 ELEMENT
http://ogp.me/ns#type
og:article (Die Eigenschaft http://ogp.me/ns#type wird von Google nicht als Objekt des Typs WebPage erkannt.)
cancelhttp://ogp.me/ns#locale
de-DE (Die Eigenschaft http://ogp.me/ns#locale wird von Google nicht als Objekt des Typs WebPage erkannt.)
cancelhttp://ogp.me/ns#title
CMSimple_XH | Plugin | Remotecontent_XH | Beispiel Textdatei (Die Eigenschaft http://ogp.me/ns#title wird von Google nicht als Objekt des Typs WebPage erkannt.)
cancelhttp://ogp.me/ns#site_name
CMSimple_XH Plugins, Kawasaki Vulcan (Die Eigenschaft http://ogp.me/ns#site_name wird von Google nicht als Objekt des Typs WebPage erkannt.)
cancelhttp://ogp.me/ns#url
https://olaf.penschke.net/?CMSimple_XH/ ... -Textdatei (Die Eigenschaft http://ogp.me/ns#url wird von Google nicht als Objekt des Typs WebPage erkannt.)
cancelhttp://ogp.me/ns#updated_time
2018-03-07T15:59:49+01:00 (Die Eigenschaft http://ogp.me/ns#updated_time wird von Google nicht als Objekt des Typs WebPage erkannt.)
cancelhttp://ogp.me/ns#image
https://olaf.penschke.net/userfiles/ima ... ent_xh.jpg (Die Eigenschaft http://ogp.me/ns#image wird von Google nicht als Objekt des Typs WebPage erkannt.)
cancelhttp://dev.twitter.com/docs/cards#card
twitter:summary (Die Eigenschaft http://dev.twitter.com/docs/cards#card wird von Google nicht als Objekt des Typs WebPage erkannt.)
cancelhttp://dev.twitter.com/docs/cards#title
CMSimple_XH | Plugin | Remotecontent_XH | Beispiel Textdatei (Die Eigenschaft http://dev.twitter.com/docs/cards#title wird von Google nicht als Objekt des Typs WebPage erkannt.)
cancelhttp://dev.twitter.com/docs/cards#url
https://olaf.penschke.net/?CMSimple_XH/ ... -Textdatei (Die Eigenschaft http://dev.twitter.com/docs/cards#url wird von Google nicht als Objekt des Typs WebPage erkannt.)
cancelhttp://dev.twitter.com/docs/cards#image
https://olaf.penschke.net/userfiles/ima ... ent_xh.jpg (Die Eigenschaft http://dev.twitter.com/docs/cards#image wird von Google nicht als Objekt des Typs WebPage erkannt.)
cancelhttp://dev.twitter.com/docs/cards#site
@Olaf_Penschke (Die Eigenschaft http://dev.twitter.com/docs/cards#site wird von Google nicht als Objekt des Typs WebPage erkannt.)
name
Beispiel-Textdatei
cancelhttp://www.w3.org/1999/xhtml/vocab#alternate
Die Eigenschaft http://www.w3.org/1999/xhtml/vocab#alternate wird von Google nicht als Objekt des Typs WebPage erkannt.
@type
Nicht definierter Typ
cancelhttp://www.w3.org/1999/xhtml/vocab#alternate
Die Eigenschaft http://www.w3.org/1999/xhtml/vocab#alternate wird von Google nicht als Objekt des Typs WebPage erkannt.
@type
WebPage
cancelhttp://www.w3.org/1999/xhtml/vocab#alternate
Die Eigenschaft http://www.w3.org/1999/xhtml/vocab#alternate wird von Google nicht als Objekt des Typs WebPage erkannt.
@type
WebPage
However almost exclusively in connection with OGra_XH and additionally with the specification of <link rel="alternate" hreflang.
Where is the error now? Breadcrump or OGra_XH?
before:
https://olaf.penschke.net/?CMSimple_XH/ ... -Textdatei
Brand
0 FEHLER
0 WARNUNGEN
1 ELEMENT
WebPage
0 FEHLER
0 WARNUNGEN
1 ELEMENT
SoftwareApplication
0 FEHLER
1 WARNUNG
1 ELEMENT
BreadcrumbList
4 FEHLER
0 WARNUNGEN
1 ELEMENT
after:
Brand
0 FEHLER
0 WARNUNGEN
1 ELEMENT
WebPage
0 FEHLER
0 WARNUNGEN
1 ELEMENT
SoftwareApplication
0 FEHLER
1 WARNUNG
1 ELEMENT
BreadcrumbList
15 FEHLER
0 WARNUNGEN
1 ELEMENT
http://ogp.me/ns#type
og:article (Die Eigenschaft http://ogp.me/ns#type wird von Google nicht als Objekt des Typs WebPage erkannt.)
cancelhttp://ogp.me/ns#locale
de-DE (Die Eigenschaft http://ogp.me/ns#locale wird von Google nicht als Objekt des Typs WebPage erkannt.)
cancelhttp://ogp.me/ns#title
CMSimple_XH | Plugin | Remotecontent_XH | Beispiel Textdatei (Die Eigenschaft http://ogp.me/ns#title wird von Google nicht als Objekt des Typs WebPage erkannt.)
cancelhttp://ogp.me/ns#site_name
CMSimple_XH Plugins, Kawasaki Vulcan (Die Eigenschaft http://ogp.me/ns#site_name wird von Google nicht als Objekt des Typs WebPage erkannt.)
cancelhttp://ogp.me/ns#url
https://olaf.penschke.net/?CMSimple_XH/ ... -Textdatei (Die Eigenschaft http://ogp.me/ns#url wird von Google nicht als Objekt des Typs WebPage erkannt.)
cancelhttp://ogp.me/ns#updated_time
2018-03-07T15:59:49+01:00 (Die Eigenschaft http://ogp.me/ns#updated_time wird von Google nicht als Objekt des Typs WebPage erkannt.)
cancelhttp://ogp.me/ns#image
https://olaf.penschke.net/userfiles/ima ... ent_xh.jpg (Die Eigenschaft http://ogp.me/ns#image wird von Google nicht als Objekt des Typs WebPage erkannt.)
cancelhttp://dev.twitter.com/docs/cards#card
twitter:summary (Die Eigenschaft http://dev.twitter.com/docs/cards#card wird von Google nicht als Objekt des Typs WebPage erkannt.)
cancelhttp://dev.twitter.com/docs/cards#title
CMSimple_XH | Plugin | Remotecontent_XH | Beispiel Textdatei (Die Eigenschaft http://dev.twitter.com/docs/cards#title wird von Google nicht als Objekt des Typs WebPage erkannt.)
cancelhttp://dev.twitter.com/docs/cards#url
https://olaf.penschke.net/?CMSimple_XH/ ... -Textdatei (Die Eigenschaft http://dev.twitter.com/docs/cards#url wird von Google nicht als Objekt des Typs WebPage erkannt.)
cancelhttp://dev.twitter.com/docs/cards#image
https://olaf.penschke.net/userfiles/ima ... ent_xh.jpg (Die Eigenschaft http://dev.twitter.com/docs/cards#image wird von Google nicht als Objekt des Typs WebPage erkannt.)
cancelhttp://dev.twitter.com/docs/cards#site
@Olaf_Penschke (Die Eigenschaft http://dev.twitter.com/docs/cards#site wird von Google nicht als Objekt des Typs WebPage erkannt.)
name
Beispiel-Textdatei
cancelhttp://www.w3.org/1999/xhtml/vocab#alternate
Die Eigenschaft http://www.w3.org/1999/xhtml/vocab#alternate wird von Google nicht als Objekt des Typs WebPage erkannt.
@type
Nicht definierter Typ
cancelhttp://www.w3.org/1999/xhtml/vocab#alternate
Die Eigenschaft http://www.w3.org/1999/xhtml/vocab#alternate wird von Google nicht als Objekt des Typs WebPage erkannt.
@type
WebPage
cancelhttp://www.w3.org/1999/xhtml/vocab#alternate
Die Eigenschaft http://www.w3.org/1999/xhtml/vocab#alternate wird von Google nicht als Objekt des Typs WebPage erkannt.
@type
WebPage
Last edited by olape on Sun Nov 03, 2019 6:20 pm, edited 1 time in total.
Gruß Olaf, Plugins for CMSimple_XH
Ich habe schon lange den Verdacht, dass so viele so eifrig auf Gender, Trans und Queer machen:
Weil sie für das Fachliche ganz einfach zu doof sind.
Ich habe schon lange den Verdacht, dass so viele so eifrig auf Gender, Trans und Queer machen:
Weil sie für das Fachliche ganz einfach zu doof sind.
Re: Google Search Console errors
with the switch from RDFa to Microdata it looks better.
Brand
0 FEHLER
0 WARNUNGEN
1 ELEMENT
WebPage
0 FEHLER
0 WARNUNGEN
1 ELEMENT
SoftwareApplication
0 FEHLER
1 WARNUNG
1 ELEMENT
BreadcrumbList
1 FEHLER
0 WARNUNGEN
1 ELEMENT
The last Element is span, not a. This makes the mistake
position 5
item
@type
Thing
@id
Der Wert für id muss eine gültige URL sein.
Brand
0 FEHLER
0 WARNUNGEN
1 ELEMENT
WebPage
0 FEHLER
0 WARNUNGEN
1 ELEMENT
SoftwareApplication
0 FEHLER
1 WARNUNG
1 ELEMENT
BreadcrumbList
1 FEHLER
0 WARNUNGEN
1 ELEMENT
The last Element is span, not a. This makes the mistake
position 5
item
@type
Thing
@id
Der Wert für id muss eine gültige URL sein.
Gruß Olaf, Plugins for CMSimple_XH
Ich habe schon lange den Verdacht, dass so viele so eifrig auf Gender, Trans und Queer machen:
Weil sie für das Fachliche ganz einfach zu doof sind.
Ich habe schon lange den Verdacht, dass so viele so eifrig auf Gender, Trans und Queer machen:
Weil sie für das Fachliche ganz einfach zu doof sind.
Re: Google Search Console errors
This is how it works correctly together with OGra_XH.
Code: Select all
function locator()
{
$breadcrumbs = XH_getLocatorModel();
$last = count($breadcrumbs) - 1;
$html = '<span itemscope itemtype="http://schema.org/BreadcrumbList">';
foreach ($breadcrumbs as $i => $breadcrumb) {
list($title, $url) = $breadcrumb;
if ($i > 0) {
$html .= ' > ';
}
$html .= '<span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">';
$inner = '<span itemprop="name">' . $title
. '</span>';
$html .= '<a itemprop="item" href="' . $url . '">'
. $inner . '</a>';
$html .= '<meta itemprop="position" content="'. ($i + 1) . '"></span>';
}
$html .= '</span>';
return $html;
}
Gruß Olaf, Plugins for CMSimple_XH
Ich habe schon lange den Verdacht, dass so viele so eifrig auf Gender, Trans und Queer machen:
Weil sie für das Fachliche ganz einfach zu doof sind.
Ich habe schon lange den Verdacht, dass so viele so eifrig auf Gender, Trans und Queer machen:
Weil sie für das Fachliche ganz einfach zu doof sind.
Re: Google Search Console errors
and the last element is not a link
Code: Select all
function locator()
{
$breadcrumbs = XH_getLocatorModel();
$last = count($breadcrumbs) - 1;
$html = '<span itemscope itemtype="http://schema.org/BreadcrumbList">';
foreach ($breadcrumbs as $i => $breadcrumb) {
list($title, $url) = $breadcrumb;
if ($i > 0) {
$html .= ' > ';
}
$html .= '<span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">';
$inner = '<span itemprop="name">' . $title
. '</span>';
if (isset($url) && $i < $last) {
$html .= '<a itemprop="item" href="' . $url . '">'
. $inner . '</a>';
} else {
$html .= $inner;
}
$html .= '<meta itemprop="position" content="'. ($i + 1) . '"></span>';
}
$html .= '</span>';
return $html;
}
Gruß Olaf, Plugins for CMSimple_XH
Ich habe schon lange den Verdacht, dass so viele so eifrig auf Gender, Trans und Queer machen:
Weil sie für das Fachliche ganz einfach zu doof sind.
Ich habe schon lange den Verdacht, dass so viele so eifrig auf Gender, Trans und Queer machen:
Weil sie für das Fachliche ganz einfach zu doof sind.