Hello, Alaa
This module(entity_hierarchy) is not compatible with solo breadcrumbs, However, for other theme, it is no problem.
For solo, it generates two title items. Can this problem be solved?
Repro steps:
1.<code>composer require 'drupal/entity_hierarchy:^5.0@alpha'
2.Install module (Entity Hierarchy and Entity Hierarchy Breadcrumb)
3.Add fields to the article type. (/admin/structure/types/manage/article/fields/add-field)
4.Choose a type of field: Entity reference hierarchy
5.Enter "Test" as field label name.
6.Type of item to reference > Content
7.Content type > Article
8.save
9.Create several articles, pay attention to referencing them in the "Test" field.
For example:
Article 1: Title is "Box". No Reference articles.
Article 2: Title is "Fruit". Reference "Box" article by "Test" field.
Article 3: Title is "Apple". Reference "Fruit" article by "Test" field.
Hierarchical Structure: Box > Fruit > Apple
10.Now take a look at breadcrumbs of Apple article page.
I see two Apples:
Home > Box > Fruit > Apple > Apple
11.Switch to Olivero or other theme as the default theme.
I see it's normal:
Home > Box > Fruit > Apple
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | Snipaste_2025-02-12_20-56-20.png | 19.04 KB | hastroop |
| #6 | After changes.png | 118.48 KB | vinodhini.e |
| #6 | Before changes.png | 151.17 KB | vinodhini.e |
Issue fork solo-3505486
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3505486-compatibility-issue-between
changes, plain diff MR !14
Comments
Comment #2
hastroop commentedI found an option: Tick this box to exclude the page title from the Breadcrumb. However, it only removes one, and the another title still exists.
Also, the page title can remove at breadcrumbs, Is there also an option to exclude the "Home" breadcrumb. Thank you.
Comment #3
flashwebcenterHello,
I will review and test the theme together. In the meantime, the breadcrumb feature can be disabled in the theme settings under Breadcrumb.
Best wishes,
Alaa
Comment #4
vinayakmk47Comment #5
vinayakmk47I have fixed the issue and created the merge request please review and approve the changes made.
Comment #6
vinodhini.e commentedReproduced this issue in Drupal 10.4.1 and successfully merged the code in Merge Request #5. The patch is working as expected.
Attached are screenshots showing the issue before and after applying the patch.
Thanks!
Comment #7
hastroop commentedAfter testing, the code only solved one additional title item for breadcrumbs, However, an option of the theme breadcrumbs setting is invalid.
"Tick this box to exclude the page title from the Breadcrumb."
/admin/appearance/settings/soloThe perfect result should be:
Tick this option, the breadcrumbs will look like this:
Home > Box > Fruit = Its function is to remove the title item of breadcrumbs.
Do not Tick this option, the breadcrumbs look like this:
Home > Box > Fruit > Apple
In addition, is it possible to add an option to remove breadcrumbs "Home" item?
Removing and retaining these two breadcrumb items are two common functions of breadcrumbs.
Comment #8
hastroop commentedThe perfect result should be:
Check this option, the breadcrumbs will look like this: Home > Box > Fruit = Its function is to remove the title item of breadcrumbs.
Cancel this option, the breadcrumbs look like this: Home > Box > Fruit > Apple
Comment #9
hastroop commentedAlso, is it possible to add an option to remove breadcrumbs "Home" item?
Removing and retaining these two breadcrumb items are two common functions of breadcrumbs.
Thank you
Comment #10
flashwebcenterHello,
Thank you for your guidance on testing. I followed your instructions and was able to identify the issue.
By default, Drupal does not include the page title in the breadcrumb. Solo provides an option to add this feature, as do some other contributed modules. Solo's functionality works as intended—it either adds the title or does not, based on the configured settings. However, Solo does not include a feature to remove titles that were added by other contributed modules.
When the Entity module is installed, it also adds the page title to the breadcrumb, which results in duplicate titles when used with Solo. If the title option in Solo is disabled, it simply reverts to the default Drupal behavior.
To improve this functionality, I have refactored the breadcrumb handling in Solo. Now, when the title option is enabled, Solo will add the title to Content, Views pages, Taxonomy pages, User pages, and Webform pages. However, I have introduced a new check to ensure that if another module or theme has already added the title, Solo will not add it again.
Feel free to download the latest development version or disable the feature and use the title provided by the entity module.
Best wishes,
Alaa
Comment #12
hastroop commentedThank you for resolving the issue, so Solo will not remove the title item added by Entity Hierarchy Breadrumb. This may be a feature request for the Entity Hierarchy module. I have already made this request there.