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.
Hi,
Maybe it's an issue on my side but I am not able to export oembed video from media core entity. Do you have any leads about this?
Comment | File | Size | Author |
---|---|---|---|
#5 | 3046750-5.patch | 9.59 KB | samuel.mortenson |
|
Comments
Comment #2
samuel.mortensonI'm sprinting on this this week - interestingly hard problem but the fix will be similar to Views pagers - modifying URLs to not use query params (/media/oembed?url=... -> /media/oembed/[url or hash of url]). Thanks for the issue!
Comment #3
samuel.mortenson@jlatorre Could you try this out and let me know if it works out for you? Thanks!
Also filed #3047447: Split document and destination modification used for pagers and oembed into event subscribers as a follow up to abstract this pattern out for future use cases.
Comment #5
samuel.mortensonQuick test fix.
Comment #6
jlatorre CreditAttribution: jlatorre commentedThanks, I'm testing it
Comment #7
jlatorre CreditAttribution: jlatorre commentedWorks fine!
Just removed /media/oembed from default path to exclude
Comment #8
jlatorre CreditAttribution: jlatorre commentedComment #10
samuel.mortenson@jlatorre Is there a reason you'd want that path included on builds? /media/oembed, without query parameters, seems like it wouldn't be useful to have on a site. With the patch from #5 all oembed paths should be added to the static build if found referenced in an iframe.
Comment #11
jlatorre CreditAttribution: jlatorre commentedHum, I thought media was not exported with this path in the list but I might have tested it in a wrong way
Comment #12
jlatorre CreditAttribution: jlatorre commentedWhy do you export all media but media/oembed?
Comment #13
samuel.mortenson@jlatorre The /media/oembed path should only be excluded if it doesn't have query parameters - Tome picks up all routes in the initial process (see
\Drupal\tome_static\EventSubscriber\RoutePathSubscriber
), but some module routes aren't meant to be used directly. Some, like routes derived from Views, are meant to be generated.So /media/oembed is excluded initially, because that path will just 403 without query parameters. When Tome detects an oembed URL in an iframe, the path is handled and transformed so that it's compatible with the static build.
Does that make more sense? If the patch from #5 isn't working for you we should figure that out, but un-excluding /media/oembed should not affect that.
Comment #14
jlatorre CreditAttribution: jlatorre commentedOk thanks for explanations!
#5 works fine for me after testing again. Don't know what I've done but it's ok for me.
Comment #15
samuel.mortensonCool! I'll have this committed soon then. Putting back to RTBC for #5. Thanks for testing.
Comment #17
samuel.mortensonCommitted! Should be in the next RC.