Fix Breadcrumbs markup ...

Discuss Search Engine Optimization in relation to Joomla! 3.x. This forum will also have discussions on SEF/SEO Joomla! 3.x extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
b4pjoe
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Sat Sep 05, 2009 10:14 pm

Re: Fix Breadcrumbs markup ...

Post by b4pjoe » Mon Sep 23, 2019 10:21 pm

I don't think it is just a Joomla issue. Google it and it shows it is happening to WordPress users too.

User avatar
trogladyte
Joomla! Explorer
Joomla! Explorer
Posts: 400
Joined: Sat May 03, 2008 9:27 pm
Location: Phoenix, AZ
Contact:

Re: Fix Breadcrumbs markup ...

Post by trogladyte » Mon Sep 23, 2019 11:49 pm

@sozzled, is there a better alternative to the native J! BC module that DOES keep Google happy? Being the 800lb gorilla, I want to stay as "okie dokie" with them as possible.
Ian Shere - Phoenix Website Design & Hosting
http://www.citruskiwi.com

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8009
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Fix Breadcrumbs markup ...

Post by sozzled » Tue Sep 24, 2019 2:33 am

Thanks for your question, @trogladyte. While Google seems to be a sixes-and-sevens ATM, I don't know what works and what doesn't. I have been using Krizalys Breadcrumbs (you can find it in the JED) and it worked better for G SERPs than the standard J! b/crumbs module, but G objects to the validity of the microdata even with the 3rd-party extension. So, I don't really know the answer to the question at this time. As I wrote earlier, we'll just have to wait for what's going on at G. I suspect there are a few red faces over these new developments.
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

StefanSTS
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Thu Jul 30, 2015 7:39 am

Re: Fix Breadcrumbs markup ...

Post by StefanSTS » Tue Sep 24, 2019 4:07 am

Well, I was made aware of that rumor not via Twitter, but by someone on Facebook's German Joomla group, which is about the only thing I follow on Facebook. That rumour seems deleted by now. :-)
That someone spread the rumour without source, so I asked for it as you did, and I got the link to the rumour page. And I too felt like why the hell is someone posting these rumors? And I did the same. Shame on me. ;-)

But back to topic:
The microdata in my newly changed code might just do, what you want, showing the last item in your SERPs, because it has an @id and name now. Check the code and see that even the a element has an href and an itemid now. That is important as I learned.

And no, I don't really care about Google having a red mark for a few days, but it came up, and I was just in the mood to do it properly, so now there is something to use or work on, if not all are satisfied with the new options I added. (Options as in removing menu headers without links, and the second, using a link for the last item or not.)

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8009
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Fix Breadcrumbs markup ...

Post by sozzled » Tue Sep 24, 2019 6:52 am

Remember that there are actually two problems here:

1) There's the "validation" issue—this is the problem that nearly everyone who has contributed to this forum topic has been banging on about: the fact the Google objects to the [standard J!] breadcrumbs module's mark-up of microdata.

2) The other issue is—and it relates, in part, to the latest manoeuvres by Google—involves using the breadcrumbs' microdata to create "smart snippets" in forming the SERPs.

Both these matters are covered, in fairly general terms, at https://developers.google.com/search/do ... breadcrumb and at https://wptavern.com/google-search-cons ... ata-errors. So they're worth a read.

Like everyone else, I don't like seeing errors on Google Search Console. I think that what most people are concerned about are these kinds of errors and, when they happen, people are often quick of the mark to point the accusing finger at "Joomla!" Well, the problem isn't isolated to "J!".

More importantly for me is the second of the two problems: the SERPs. As I wrote earlier in this topic (viewtopic.php?f=712&t=974526#p3581156), I've not been a big fan of the standard J! breadcrumbs module in producing nice microdata and I don't know if this aspect of the problem will be addressed by the J! developers.

Cheers. :)
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

cawiai
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Sep 24, 2019 8:43 am

Re: Fix Breadcrumbs markup ...

Post by cawiai » Tue Sep 24, 2019 8:53 am

Thank you for the information.

aram7x
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Nov 03, 2008 2:32 pm

Re: Fix Breadcrumbs markup ...

Post by aram7x » Tue Sep 24, 2019 5:32 pm

Hi guys,

I found this solution:
https://dj-extensions.com/blog/general/ ... n-joomla-3

Thanks,
Alireza

Cpointcc
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Mon Jun 30, 2008 2:24 pm

Re: Fix Breadcrumbs markup ...

Post by Cpointcc » Tue Sep 24, 2019 6:33 pm

https://dj-extensions.com/blog/general/ ... n-joomla-3

Yes - I can attest this fixes the issue. The latest Joomla update still does not address this either.

User avatar
inguarkp
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 103
Joined: Mon Apr 09, 2007 5:04 pm
Contact:

Re: Fix Breadcrumbs markup ...

Post by inguarkp » Sun Sep 29, 2019 5:32 pm

Hello zozzled!
I have many of those problems Fix Breadcrumbs markup ..
in which default.php file shal I replace the code?
Best Reards
inuarkp

sozzled wrote:
Sun Sep 22, 2019 7:20 pm
Damned if I can make it work, @Per!

Code: Select all

				<div aria-label="breadcrumbs" role="navigation">
	<ul itemscope itemtype="https://schema.org/BreadcrumbList" class="breadcrumb">
					<li>
				You are here: &#160;
			</li>
		
						<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
											<a itemprop="item" href="/" class="pathway"><span itemprop="name">Home</span></a>
					
											<span class="divider">
							<img src="/media/system/images/arrow.png" alt="" />						</span>
										<meta itemprop="position" content="1">
				</li>
							<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
											<a itemprop="item" href="/blog" class="pathway"><span itemprop="name">Blog</span></a>
					
											<span class="divider">
							<img src="/media/system/images/arrow.png" alt="" />						</span>
										<meta itemprop="position" content="2">
				</li>
							<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem" class="active">
					<span itemprop="item" itemprop="id" content="">
						<span itemprop="name">
							Prelude to the beginning						</span>
					</span>
					<meta itemprop="position" content="3">
				</li>
				</ul>
</div>
GSC reports an error (see screeshot).

Thanks for your time, even if I'm struggling with GSC: :laugh:

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 26121
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: Fix Breadcrumbs markup ...

Post by Per Yngve Berg » Sun Sep 29, 2019 7:56 pm

A deprecated call (JROUTE) is used in helper.php, line 61

Replace with

Code: Select all

			$item->link = Joomla\CMS\Router\Route::_('index.php?Itemid=' . $home->id,0,0,1);
The last one return absolute URL instead of relative. Still it will return empty when the last part is an article. I still don't have a solution for that yet.

User avatar
yellowwebmonkey
Joomla! Explorer
Joomla! Explorer
Posts: 327
Joined: Tue Nov 17, 2009 4:22 am
Location: Central Texas
Contact:

Re: Fix Breadcrumbs markup ...

Post by yellowwebmonkey » Wed Oct 09, 2019 3:43 pm

Here is a patch that works and I have successfully had Google validate on my sites:

The default Joomla breadcrumbs do not put a link on the last breadcrumb, and that is causing the validation issue. The dilemma is that you do not want a link that simply goes to itself or that confuses users.

The solution is to go to template code and make an override for mod_breadcrumbs

Around line 56, find

Code: Select all

<?php if (($key !== $penult_item_key) || $show_last) : ?>
      <span class="divider">
          <?php echo $separator; ?>
      </span>
<?php endif; ?>
And replace with

Code: Select all

<?php if (($key !== $penult_item_key) || $show_last) : ?>
     <link  href="/<?php echo $item->link; ?>">
      <span class="divider">
          <?php echo $separator; ?>
      </span>
<?php endif; ?>


Around line 65, find

Code: Select all

<li  itemscope itemtype="https://schema.org/ListItem" class="active">
        <span itemprop="name">
      <?php echo $item->name; ?>
        </span>
        <meta  content="<?php echo $key + 1; ?>">
</li>
And replace with

Code: Select all

<li  itemscope itemtype="https://schema.org/ListItem" class="active">
<link  href="/<?php echo $item->link; ?>">
        <span itemprop="name">
      <?php echo $item->name; ?>
        </span>
        <meta  content="<?php echo $key + 1; ?>">
</li>

There is a short video of the whole process at https://www.yellowwebmonkey.com/develop ... oomla-site


Post Reply

Return to “Search Engine Optimization (Joomla! SEO) in Joomla! 3.x”