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

  1. Allow media standalone URL
  2. Link to a media item

Expected output:
/media/3

Actual output:
/media/

Proposed resolution

- Fix the test
- Fix the logic

Remaining tasks

  1. Write a patch
  2. Review
  3. Commit

User interface changes

None.

API changes

None.

Data model changes

None.

CommentFileSizeAuthor
#2 3108030-2.patch1.99 KBLendude
#2 3108030-2-TEST_ONLY.patch897 bytesLendude
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Lendude created an issue. See original summary.

Lendude’s picture

Status: Active » Needs review
FileSize
897 bytes
1.99 KB

Fixed test and fixed logic.

idebr’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

The patch in #2 fixes the issue described.

Chris Burge’s picture

+1 for committing - the missing drupal_flush_all_caches() in the tests tripped me up. Thanks @Lendude for getting to the bottom of this!

Johan den Hollander’s picture

Just confirming that the #2 patch still applies to 5.x-dev and is necessary when making links to media items.

  • anon committed 192fe94 on 8.x-5.x authored by Lendude
    Issue #3108030 by Lendude, anon: Media links with standalone_url on are...
anon’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the patch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.