- Issue created by @John_B
- Status changed to Postponed: needs info
11 months ago 8:37pm 14 January 2024 - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
The default argument to
toUrl
is'canonical'
, I'm not sure why this makes a difference? - π©πͺGermany m-p-j
Same thing happened to me after updating core to 10.2.1 (amongst other modules).
This fix seems to help, thanks. - π©πͺGermany m-p-j
From what I can see Drupal\aggregator\Entity\Item is missing the "links" annotation.
Drupal\aggregator\Entity\Feed has one. - Status changed to Needs work
11 months ago 3:06pm 17 January 2024 - Status changed to Active
11 months ago 2:48am 18 January 2024 - πΊπΈUnited States dcam
This was caused by this change to
EntityBase::toUrl()
in Core version 10.2.x: https://git.drupalcode.org/project/drupal/-/commit/9c4bc86ccbeb7c28b9217....canonical
is no longer the default,NULL
is. Then if therel
isNULL
, it checks to see if the entity type defines either acanonical
oredit_form
link. If neither of those is defined, then it throws the exception shown here. So basically Core doesn't support not having a links defined in your entity annotation anymore, like aggregator_item.Entering
canonical
as therel
argument fixes this problem because it bypasses the new code added in that commit.EntityBase::toUrl()
then falls back to the annotateduri_callback
, which is what builds the Item URLs.Although we can insert
canonical
into the block'sbuild()
function, I'm not convinced this is the best fix. Apparently, Core wants to remove theuri_callback
annotation because it was a BC hack for D7 compatibility or something. See π [meta] convert βuri_callbackβ entities param to EntityInterface::uri() method Active for details. Since we have to make a change to fix this problem, maybe we should take action to remove theuri_callback
now.But if anyone needs to fix a broken site right now, then putting
canonical
intobuild()
will work at the moment. - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
We should be reporting this on the core issue too, seems like a BC break
- πΊπΈUnited States dcam
We should be reporting this on the core issue too, seems like a BC break
I was thinking the same.
- πΊπΈUnited States dcam
Thank you. I misunderstood and was looking for an existing issue about the BC break.
- Status changed to RTBC
11 months ago 5:31am 18 January 2024 - πΊπΈUnited States dcam
There were several test failures. I'll have to finish working on them tomorrow because I don't yet know why they're happening.
- πΊπΈUnited States dcam
Added π Drupal 10.2.3-dev breaks Aggregator tests Active as a parent issue since the broken block now causes Aggregator's tests to fail. The error described here shows up in the failure output.
- πΊπΈUnited States dcam
I reverted the change for the unrelated test failures just to keep this commit clean. I'll redo that change in π Drupal 10.2.3-dev breaks Aggregator tests Active .
- Status changed to Fixed
11 months ago 4:31pm 18 January 2024 - πΊπΈUnited States dcam
Thank you, everyone! This will be released in version 2.2.0 later today. I'm going to see if I can get the other test failures fixed first. But if I can't, then I'll go ahead and release this bug fix despite the failing tests.
- π¬π§United Kingdom John_B London (UK), Worthing (UK), Innsbruck (Tirol)
Many thanks.
Automatically closed - issue fixed for 2 weeks with no activity.
- π©πͺGermany tstoeckler Essen, Germany
Wow, sorry for causing trouble due to the core issue! Opened π [regression] Entity::toUrl() without argument is broken for entity types with a URI callback Needs review now to rectify this, so hopefully at least no-one else will be hit by this.