Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Steps to reproduce
- Install Drupal
- Visit the front page. Notice that there is no breadcrumb.
- Add a different language.
- Visit the front page in the new language
- The breadcrumb is visible on the front page, but it shouldn't be.
Comment | File | Size | Author |
---|---|---|---|
#38 | Screenshot 2020-07-09 16.28.19.png | 61.21 KB | pameeela |
#38 | Screenshot 2020-07-09 16.28.32.png | 64.18 KB | pameeela |
#38 | Screenshot 2020-07-09 16.19.19.png | 68.24 KB | pameeela |
#38 | Screenshot 2020-07-09 16.19.29.png | 71.95 KB | pameeela |
#38 | Screenshot 2020-07-09 16.22.56.png | 70.01 KB | pameeela |
Comments
Comment #2
herom CreditAttribution: herom commentedComment #3
herom CreditAttribution: herom commentedComment #4
Gábor HojtsyHm, nothing specific in SystemBreadcrumbBlock about visibility. Not sure where it is specified.
Comment #5
dawehnerI guess the problem is that
\Drupal\system\PathBasedBreadcrumbBuilder::build
might return something, even usually it should not for the frontpage.Comment #6
ameymudras CreditAttribution: ameymudras as a volunteer commentedTried debugging the
\Drupal\system\PathBasedBreadcrumbBuilder::build
but could not find anything here. Problem seems to be somewhere elseComment #7
ameymudras CreditAttribution: ameymudras as a volunteer commentedComment #8
ameymudras CreditAttribution: ameymudras as a volunteer commentedGuys sorry for the previous comment, the issue was
\Drupal\system\PathBasedBreadcrumbBuilder::build
where the homepage was not correctly identified. Ive created a patch and attachedComment #10
Gábor HojtsyNeeds tests on its own.
Comment #12
dawehnerDo we need to take care about some other bits as well, like
?
It seems to be that there are multiple places where we deal with the frontpage
Comment #13
ameymudras CreditAttribution: ameymudras as a volunteer commented@dawehner how about removing
and only handling it at one place? I've attached a inter-diff for the same
Comment #14
ameymudras CreditAttribution: ameymudras as a volunteer commentedComment #15
dawehnerI would rather suggest something like this
Comment #17
Gábor HojtsyRemoving from sprint so it reflects what is currently being worked on.
Unfortunately.
Comment #18
alexpottDiscussed with @xjm and @catch and manually tested myself. We agreed that this is a major bug because the breadcrumb should not be showing.
Comment #19
alexpottComment #21
dagmarComment #23
catchWe should either just use Url or use the injected Url builder - I went for injection since the patch was going that way anyway.
Tests should pass now.
Comment #25
catchComment #27
catchSo that doesn't work because the front page is '/node' but the url generator makes it '/' which means it doesn't get excluded properly when the literal front page path is there such as node/add/page when '/node' is configured as the front page.
This might do it.
Comment #28
catchAlso, this is really getting silly. Might want a follow-up to revisit it.
Comment #30
Simon Georges CreditAttribution: Simon Georges at Makina Corpus commentedI tried the patch and it seems it doesn't work when Drupal is installed in a sub-directory of the webservice web root, because removing front ("/") doesn't completely work. Is there something like the base_path in D7 we can use?
Comment #38
pameeela CreditAttribution: pameeela commentedI am hesitant to close this because I can't see where it was fixed, but I can't reproduce this in 9.0.1 and the steps are quite simple so I don't think I'm missing anything.
I tried a few ways, on two different installs, with the default /node home page and with an actual node set as the home page, and with a few languages but I'm not getting a breadcrumb on home in any language.
Home with /node - English (default)
Home with /node - French
Home with /node/1 set to home - Chinese, Traditional (default)
Home with /node/1 set to home - English
Comment #39
shailja179 CreditAttribution: shailja179 at Srijan | A Material+ Company for Drupal India Association commentedComment #40
pameeela CreditAttribution: pameeela commentedI think Closed (outdated) is the right status for this where obviously it was an issue at one time, but so much has changed and it's no longer occurring, but I can't find any likely duplicates.
If anyone can provide updated steps to reproduce the issue (starting from "Install Drupal core"), document those steps in the issue summary and set the issue status back to "Active".
Thanks!
Comment #41
mdupontI tested it for the latest commit of the 9.1.x branch, then the 8.8.x branch. Cannot reproduce the original issue, the breadcrumb stays hidden on the homepage.
Steps taken:
node/{node id}
of the newly created ArticleComment #42
mdupontNo idea why it changed the status to Needs Work, was not intentional.
Comment #43
shailja179 CreditAttribution: shailja179 at Srijan | A Material+ Company for Drupal India Association commentedUnassigning this issue as it could not be reproduced.
Comment #44
pameeela CreditAttribution: pameeela commented