-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Google showing the homepage link twice #1561
Comments
|
@CMSworker @ausi What's the status of this issue? |
|
This issue is Google related and can not be solved, as long as you are ignoring the fields that Google is defining as "required" in their documentation. So no, currently there is no solution, because fix #1527 is not working for Google (see comment here) and #1421 (or #1429) are already closed without a solution that is interpreted correctly by Google. |
|
The following changes in the <?php $this->block('content'); ?>
<ul itemprop="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList">
- <?php foreach ($this->items as $item): ?>
+ <?php foreach ($this->items as $count => $item): ?>
<?php if ($item['isActive']): ?>
- <li class="active<?php if ($item['class']): ?> <?= $item['class'] ?><?php endif; ?> last" itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement"><span itemprop="name"><?= $item['link'] ?></span></li>
+ <li class="active<?php if ($item['class']): ?> <?= $item['class'] ?><?php endif; ?> last"><?= $item['link'] ?></li>
<?php else: ?>
- <li<?php if ($item['class']): ?> class="<?= $item['class'] ?>"<?php endif; ?> itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement"><a href="<?= $item['href'] ?>" title="<?= $item['title'] ?>" itemprop="url"><span itemprop="name"><?= $item['link'] ?></span></a></li>
+ <li<?php if ($item['class']): ?> class="<?= $item['class'] ?>"<?php endif; ?> itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement"><a href="<?= $item['href'] ?>" title="<?= $item['title'] ?>" itemprop="item"><span itemprop="name"><?= $item['link'] ?></span></a><meta itemprop="position" content="<?= $count + 1 ?>"></li>
<?php endif; ?>
<?php endforeach; ?>
</ul> |
|
Note that if |
|
Fixed (hopefully for good) in contao/contao@23f005a. |
Description ----------- | Q | A | -----------------| --- | Fixed issues | Fixes #1271 | Docs PR or issue | - Commits ------- ec281b0e Show "-" instead of "0" if no related record can be loaded

June 11th, 2018, 21:56 GMT
Did somebody test this successfully in an active live installation?
In my case it didn't solve the problem of Google showing the homepage link twice. Still looking like this:
https://www.domain.de > Homepage > Subpageinstead of
https://www.domain.de > SubpageI thougt the problem could possibly be the wrong id of the webpage, when the breadcrumbs are now a microdata child element of the whole page.
Like in your screenshot, right side, 2. line:
@id: https://.../topThe id "top" is set in line 28 in fe_page.html5 together with itemtype="http://schema.org/WebPage" :
<body id="top" class="...Because of the anchor id there is a difference in the URL of the webpage element and the URL in the breadcrumb element. So probably machines see this as two different entities/webpages and the breadcrumb and page-id-url will never be identical?
I changed it for testing and added an explizit microdata itemid, so the url of the webpage-element is the same as within the breadcrumb link:
<body id="top" itemid="{{env::path}}{{env::request}}" class="...Didn't work.
What are your findings?
The text was updated successfully, but these errors were encountered: