benjaminkott / benjaminkott/bootstrap_package
page.theme.breadcrumb.enableLevel
- Dominant language
- PHP
- Stars
- 355
- Forks
- 212
- Avg merge
- 1h 4m
- Merged PRs (30d)
- 31
Description
**Bug Report: `page.theme.breadcrumb.enableLevel` setting has no effect after upgrade from TYPO3 v13 to v14 with Bootstrap Package 15.x → 16.x**
---
**Environment**
- TYPO3: 14.3.0
- Bootstrap Package: 16.0.0
- PHP: 8.2
- Upgraded from: TYPO3 13.4.28 + Bootstrap Package 15.0.4
---
**Description**
After upgrading from TYPO3 v13 (Bootstrap Package 15.x) to TYPO3 v14 (Bootstrap Package 16.x), the `page.theme.breadcrumb.enableLevel` setting does not work as expected.
The breadcrumb navigation is displayed on all pages including the root page (tree level 0), regardless of the value set in:
- Site Settings GUI (Sites → Setup → Navigation → Breadcrumb → "Show menu level if greater or equal to this value")
- TypoScript constants (`page.theme.breadcrumb.enableLevel = 2`)
- `config/sites/{site}/settings.yaml`
The value is correctly loaded as a TypoScript constant (confirmed via Active TypoScript → Constants in the backend), but the `if` condition in the DataProcessor does not evaluate correctly.
---
**Root cause analysis**
The condition in `Configuration/Sets/Full/TypoScript/General/page.typoscript` is:
```typoscript
30 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
30 {
special = rootline
special.range = 0|-1
includeNotInMenu = 1
as = breadcrumb
if {
value = {$page.theme.breadcrumb.enableLevel}
value {
insertData = 1
prioriCalc = 1
stdWrap.wrap = |-1
}
isGreaterThan {
data = level
}
}
}
```
The `prioriCalc = 1` combined with `stdWrap.wrap = |-1` is intended to subtract 1 from the `enableLevel` value. However, this condition appears to not evaluate correctly in TYPO3 14 when the value is sourced from Site Settings (`settings.yaml`), causing the breadcrumb to always render regardless of the configured level.
Additionally, the logic itself seems inverted relative to the label "Show menu level if greater or equal to this value" — setting a negative value (e.g. `-1`) should theoretically prevent display on the root page, but it does not.
---
**Steps to reproduce**
1. Upgrade TYPO3 from v13.4 to v14.3 and Bootstrap Package from 15.x to 16.x
2. Configure Site Sets (Sites → Setup) with Bootstrap Package: Full Package
3. In Site Settings, set Breadcrumb → "Show menu level if greater or equal to this value" to `2`
4. Clear TYPO3 cache
5. Visit the root page of the website
6. Breadcrumb is displayed on the root page despite the level restriction
---
**Expected behavior**
Breadcrumb should not be displayed on pages at tree level 0 (root page) when `enableLevel` is set to `2` or higher.
---
**Actual behavior**
Breadcrumb is displayed on all pages regardless of the `enableLevel` value.
---
**Workaround**
The following TypoScript condition in the template Setup field resolves the issue by removing the breadcrumb DataProcessor entirely on the root page:
```typoscript
[tree.level === 0]
page.10.dataProcessing.30 >
[end]
```
This workaround works correctly but should not be necessary — the built-in `enableLevel` setting should handle this case.
---
**Additional notes**
This issue does not occur in TYPO3 v13 with Bootstrap Package 15.x. The regression was introduced as part of the migration to Site Sets in Bootstrap Package 16.x / TYPO3 14.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with Configuration/Sets/Full/TypoScript/General/page.typoscript and inspect the breadcrumb MenuProcessor condition using the reported enableLevel values from Site Settings and TypoScript constants. Reproduce the TYPO3 14.3 and Bootstrap Package 16.0 behavior after clearing the cache; done means the breadcrumb is absent at tree level 0 when enableLevel is set to 2 or higher.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bootstrap, php
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 70/100