- Issue created by @agogo
- π©πͺGermany spuky
Drupal 9 has been deprecated for since 1. November 2023 can you check if it is the case in 10.3 or 11 ?
- Status changed to Postponed: needs info
4 months ago 5:36pm 3 September 2024 - leymannx Berlin
What does this "Visit JSON" part mean? Is this JSON:API? π€
- leymannx Berlin
(Postponed because we need to have this checked with D10/11.)
- πΈπͺSweden agogo
Tested again, exact same approach but with Drupal 10.3.2. Same problem. Cannot test Drupal 11 atm because of the DB version requirements.
"Visit JSON" means checking the JSON output which are at the default location and can be viewed through a web browser (easiest way if you're not used to working with JSON). Just replace everything in brackets [protocol]://[domain]/jsonapi/node/article/[uuid] (for example http://local.drupal10/jsonapi/node/article/68a87a7a-e28b-492b-a83c-c734f...)
- πΈπͺSweden agogo
To clarify the issue:
Normally when using URL objects one can decide wether the URL as a string (toString()) should be absolute or not with the function setAbsolute(). The default seems to be FALSE.
When using multiple languages and language detection is set to domain, the setAbsolute() function makes no difference. The toString() function always returns the URL as an absolute domain.
In function setRouteContextFromRouteMatch, the URL object created usually outputs the URL without protocol and domain when converted to string ($url->toString()). In this case "/news/my-test-news-item". This is sent to getRequestForPath().
However, when using multiple languages and detection is set to domain, the string sent to getRequestForPath() is absolute. This seems to be where the module breaks down and results in a faulty breadcrumb.