- Issue created by @acbramley
- Merge request !5888Issue #3409895: [regression] toUrl can incorrectly return edit-form url when another link template shares the canonical url β (Closed) created by acbramley
- π¦πΊAustralia acbramley
Failed as expected https://git.drupalcode.org/issue/drupal-3409895/-/pipelines/66112/test_r...
- Status changed to Needs review
about 1 year ago 4:46am 20 December 2023 - π¦πΊAustralia acbramley
So swapping to intersecting by key works, although it still feels a bit icky to me. It would be nice to have a triple null coalescing but I don't think that's possible.
- Status changed to Needs work
about 1 year ago 11:10am 20 December 2023 - π¨πSwitzerland berdir Switzerland
media uses that for canonical/edit as well FWIW.
latest and canonical on the same is a bit weird though I think, what does that even mean? You can't access the default revision anymore if there's a draft? what happens if you don't have access to view that?
- Status changed to Needs review
about 1 year ago 9:44pm 20 December 2023 - π¦πΊAustralia acbramley
latest and canonical on the same is a bit weird though I think, what does that even mean?
True it's weird, but for this particular entity type that's how we wanted it. It means the View route shows the latest revision. Revision access isn't an issue in this scenario and you can access the default revision via the revision view route :)
- Status changed to RTBC
12 months ago 5:16pm 28 December 2023 - πΊπΈUnited States smustgrave
1) Drupal\Tests\Core\Entity\EntityUrlTest::testToUrlDefaultFallback Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'entity.test_entity.canonical' +'entity.test_entity.edit_form' /builds/issue/drupal-3409895/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php:94 /builds/issue/drupal-3409895/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php:515 /builds/issue/drupal-3409895/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php:155 /builds/issue/drupal-3409895/vendor/phpunit/phpunit/src/Framework/TestResult.php:728 /builds/issue/drupal-3409895/vendor/phpunit/phpunit/src/Framework/TestSuite.php:684 /builds/issue/drupal-3409895/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:651 /builds/issue/drupal-3409895/vendor/phpunit/phpunit/src/TextUI/Command.php:144 /builds/issue/drupal-3409895/vendor/phpunit/phpunit/src/TextUI/Command.php:97 FAILURES! Tests: 22, Assertions: 98, Failures: 1.
Additional test coverage seems to be there.
Change makes sense and know from the block_content module uses the same as media. Working on adding that setting to use standalone URLs too, but a separate issue.
- Status changed to Fixed
10 months ago 4:29pm 12 February 2024 - π¬π§United Kingdom catch
This seems reasonable. Committed/pushed to 11.x and cherry-picked to 10.2.x, thanks!
- π©πͺGermany tstoeckler Essen, Germany
Wow, just saw this. Sorry for introducing this! I can only speculate as to what lead to me use that indirection, but absolutely agreed that it's much more readable now, thanks! And this will (hopefully) teach me to more carefully consider the consequences of
array_flip()
in the future. In any case, great to see this fixed, thanks again! Automatically closed - issue fixed for 2 weeks with no activity.