Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
HEAD was broken by #3063393: Remove '/edit' from media entity paths
Some faulty test coverage got added that looked like it worked but in practice doesn't work.
The check for standalone_url is the wrong way around, but due to the lack of a cache flush between config changes this looks otherwise.
Test scenario
- Allow media standalone URL
- Link to a media item
Expected output:
/media/3
Actual output:
/media/
Proposed resolution
- Fix the test
- Fix the logic
Remaining tasks
- Write a patch
- Review
- Commit
User interface changes
None.
API changes
None.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#2 | 3108030-2.patch | 1.99 KB | Lendude |
#2 | 3108030-2-TEST_ONLY.patch | 897 bytes | Lendude |
Comments
Comment #2
LendudeFixed test and fixed logic.
Comment #3
idebr CreditAttribution: idebr at iO commentedThe patch in #2 fixes the issue described.
Comment #4
Chris Burge CreditAttribution: Chris Burge at University of Nebraska commented+1 for committing - the missing
drupal_flush_all_caches()
in the tests tripped me up. Thanks @Lendude for getting to the bottom of this!Comment #5
Johan den Hollander CreditAttribution: Johan den Hollander commentedJust confirming that the #2 patch still applies to 5.x-dev and is necessary when making links to media items.
Comment #7
anonThanks for the patch.