- ๐ฉ๐ชGermany Internetter Erfurt, Thรผringen
If somebody only needs the change to absolute oembed path. We made only this change, see patch attached.
- Status changed to Active
over 1 year ago 2:14am 5 July 2023 - ๐จ๐ณChina skyredwang Shanghai
> Isn't this just a bug in the decoupled application? It's the responsibility of any decoupled application to transform relative URLs?
No, I think this is at least a DX issue. When CKeditor is used to embed a remote media, the
iframe
is embedded in the body of a long text. For most front end applications, sure, they can add a domain to the URL that output by Media OEmbed, but that means the front end needs to parse the body of the text.For few frontend apps, multiple Drupal backends can be connected at the same time, therefore, the frontend would have a little bit more logic to write when prefixing a domain.
Proposed solution: And a checkbox somewhere to allow Media OEmbed to output absolute URLs when checked, and default to relative path for backward compatibility
- ๐ช๐ธSpain fjgarlin
I could reproduce this situation when testing Drupal in a subdirectory (ie:https://localhost/subdirectory).
We are trying to convert DrupalCI to GitlabCI in this issue: #3375827: Investigate tests failures โ
One of the errors we were getting was in "MediaSourceOEmbedVideoTest"
* Job: https://git.drupalcode.org/project/gitlab_ci_testbed_for_drupal_core/-/j...
* Error: ElementNotFoundException: Element matching css "iframe.media-oembed-content" not found.Upon investigation, this was due to having "/subdirectory/media/oembed?..." in the src attribute (note the starting "/"), but when prepending the base path, then "https://localhost/subdirectory/subdirectory/media/oembed?..." doesn't exist.
The fix:
* Pretty much the same as #14 (setting the value of the URL to absolute).
* See the second change here: https://git.drupalcode.org/project/gitlab_ci_testbed_for_drupal_core/-/c...
* Job: https://git.drupalcode.org/project/gitlab_ci_testbed_for_drupal_core/-/j... . See how the "MediaSourceOEmbedVideoTest" is gone.I think #14 is the cleaner and easier solution, with no UI changes needed, but the suggested MR would also solve the issue.
- Status changed to Needs review
over 1 year ago 9:14am 18 August 2023 - ๐ช๐ธSpain fjgarlin
See my previous comment for further context as this seems to be an issue as well in installations running in a subdirectory.
I've going to set this issue as "Need review" with the suggested fix in #14.
- Status changed to Needs work
over 1 year ago 1:41pm 21 August 2023 - ๐บ๐ธUnited States smustgrave
Believe the issue summary should be updated if the solution for #14 is the path forward. Will also needed test coverage.
- last update
about 1 year ago 30,134 pass - ๐ช๐ธSpain fjgarlin
Updated slightly the issue description to match the suggested fix.
- Status changed to Needs review
about 1 year ago 11:55am 1 September 2023 - ๐ฌ๐งUnited Kingdom catch
Given this fails on gitlab ci that will be plenty of implicit test coverage so happy to add explicit coverage in a follow-up.
- Status changed to RTBC
about 1 year ago 7:46pm 1 September 2023 - ๐บ๐ธUnited States smustgrave
Opened ๐ Add tests for oembed iframe absolute Active
- last update
about 1 year ago 29,470 pass - Status changed to Fixed
about 1 year ago 9:58pm 1 September 2023 - ๐ณ๐ฟNew Zealand quietone
The issue summary was updated a bit in #22
Automatically closed - issue fixed for 2 weeks with no activity.