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?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jlatorre created an issue. See original summary.

samuel.mortenson’s picture

Assigned: Unassigned » samuel.mortenson

I'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!

samuel.mortenson’s picture

Status: Active » Needs review
FileSize
9.18 KB

@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.

Status: Needs review » Needs work

The last submitted patch, 3: 3046750-3.patch, failed testing. View results

samuel.mortenson’s picture

Status: Needs work » Needs review
FileSize
9.59 KB

Quick test fix.

jlatorre’s picture

Thanks, I'm testing it

jlatorre’s picture

Works fine!
Just removed /media/oembed from default path to exclude

jlatorre’s picture

Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 7: oembed_export-3046750-7.patch, failed testing. View results

samuel.mortenson’s picture

@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.

jlatorre’s picture

Hum, I thought media was not exported with this path in the list but I might have tested it in a wrong way

jlatorre’s picture

Why do you export all media but media/oembed?

samuel.mortenson’s picture

@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.

jlatorre’s picture

Ok thanks for explanations!
#5 works fine for me after testing again. Don't know what I've done but it's ok for me.

samuel.mortenson’s picture

Status: Needs work » Reviewed & tested by the community

Cool! I'll have this committed soon then. Putting back to RTBC for #5. Thanks for testing.

  • jlatorre authored d14131f on 8.x-1.x
    Issue #3046750 by samuel.mortenson, jlatorre: Oembed export video
    
samuel.mortenson’s picture

Status: Reviewed & tested by the community » Fixed

Committed! Should be in the next RC.

Status: Fixed » Closed (fixed)

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