Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WXR file format for Playground #82

Open
courtneyr-dev opened this issue Feb 7, 2024 · 7 comments
Open

WXR file format for Playground #82

courtneyr-dev opened this issue Feb 7, 2024 · 7 comments

Comments

@courtneyr-dev
Copy link

Can we host a WXR file format in this GitHub repo to use for importing to WP Playground installs?

@carolinan
Copy link

Can this be closed?

@flexseth
Copy link

Can this be closed?

Not quite yet. The issue involves being able to automatically import images when working in Playground.

What happens is that the images are hosted at https://wpthemetestdata.wordpress.com/, which doesn't have the proper headers to allow the files to be downloaded remotely. They are blocked by a content restriction policy (CORS) - fairly common in website security.

In order for the issue to be closed, we simply need the images hosted somewhere on WordPress.org, which is much easier than updating the security policy.

However: I (and maybe "we" to a certain degree) - don't know where to reach out to the WP.com folks to request the change. I emailed through the all purpose contact form on WP.com, but dunno if that is effective.

Here's what happens in the console when trying to import now:
321819784-c7b6e57f-dc30-4833-9efc-421a450ff9ef

Once the images are moved we can resolve this ticket and also

We have a similar request for SVN which is mentioned here

cc @tellyworth @dd32 – should plugins.svn.wordpress.org expose the CORS headers to allow using additional assets in Blueprints?

What it looks like is it is out of the control of a lot of the .org folks. Can't 100% be sure of this, but it's the signal I'm getting based on the fact that the images are hosted from .com :)

@carolinan - ideas? Know any infrastructure folks at .com? :)

@carolinan
Copy link

I don't understand why wp.com would be a blocker if the images just need to be downloaded and uploaded again on .org?

But I also don't understand how images hosted on .org would have links that matches an actual uploaded image attachment with id's, they would not be exported from a real database?

I don't understand what the plan is.

@carolinan
Copy link

@carolinan - ideas? Know any infrastructure folks at .com? :)

@danielbachhuber Know any infrastructure folks at .com?
PInging @kraftbj too as I know you are the person who helps us with the bundled theme demos...

@dd32
Copy link
Member

dd32 commented Apr 15, 2024

I went and looked internal at Automattic; Long story short is that CORS headers for *.files.wordpress.com is not possible (based on previous discussions)

I would personally suggest not hosting these on WordPress.com, and instead store them in this Github repo and use raw.githubcontent.com instead to access them.

If you absolutely must use wpcom as the hosting for the images, you'd have to replace URLS likehttps://wpthemetestdata.files.wordpress.com/2013/03/image-alignment-580x300.jpg with https://i0.wp.com/wpthemetestdata.files.wordpress.com/2013/03/image-alignment-580x300.jpg to go via an image-only CDN on the WordPress.com end that has CORS headers set.

@flexseth
Copy link

flexseth commented May 2, 2024

escalated to WP.com folks, stay tuned, props to @jp-imagines

@carolinan
Copy link

In WordPress/wordpress-playground#1250, there is a suggestion to reduce the number of media files that are imported.
This can be a separate pull request. I am mentioning it in this issue since it is related to playground.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants