- π¦πΊAustralia timfletcher
True @Steve - Drupal picks up the
data-entity-substitution
attribute and processes it when the page is saved and the filters are processed.If the value is '
canonical
', it points to the Media entity. If you replace it with 'media
', it points to to the file.You could do a bulk Find and Replace (carefully) to save the pain of finding and replacing all your media links.
- πΊπΈUnited States mark_fullmer Tucson
Worth noting that you need to set this up first before adding your links as media items. Content added prior will not update automatically
I wrote up β¨ Previously created media URLs should update if the matcher is changed from canonical to direct URL Active to raise the question of whether media entity URLs should be updated retroactively. I'm not sure it *should*, but we can think about it!
- πΊπ¦Ukraine Ruslan Piskarov Kiev, Ukraine
Is this issue again in 6.1.4 and 7.0.0-alpha1 or did I miss something?
With "Direct URL to media file entity" option I see an URL like media/XXX. - πΊπΈUnited States mark_fullmer Tucson
Is this issue again in 6.1.4 and 7.0.0-alpha1 or did I miss something?
With "Direct URL to media file entity" option I see an URL like media/XXX.I just functionally tested both 6.1.4 and the latest commit on the 7.x branch, and in both cases, the resulting rendered link to the media entity does go, as expected, to the media file (e.g., sites/default/files). To be clear, the source code in CKEditor will show
media/XXX
as in the following example, but when rendered, it does provide the link to the filesystem.<a href="/media/1" data-entity-type="media" data-entity-uuid="263229c1-f780-4d65-a09e-9c401342caa6" data-entity-substitution="media">test</a>
If
data-entity-substitution="canonical"
, it will render/media/XXX
, but ifdata-entity-substitution="media"
it will render the direct link.Documentation about this is at https://www.drupal.org/docs/extending-drupal/contributed-modules/contrib... β
@ruslan, let me know if that doesn't answer your question correctly.