-
Notifications
You must be signed in to change notification settings - Fork 268
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
Blueprints: Rename importFile to importWxr, switch to humanmade/WordPress importer #1192
Conversation
…ress-Importer Rewires the importFile step to: * Be named importWxz. The old name continues to work, though. * Use the humanmade/WordPress-Importer for importing content – it is more reliable than the official wordpress-importer and has a convenient PHP API. * Drop WXZ support – it's a maintenance burden and doesn't add clear value. Closes #1183 Closes #379 Closes #1158 Closes #1161
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems fine. I may have missed this point
Remove dependency on
DOMParser
– this step should now work in wp-now
Is that a TODO still? or is this already part of this PR?
importWxr looks good, just looking back at everything in the steps
|
Interested to see the tools |
@dmsnell It's a part of this PR. function DOM(response: PHPResponse) {
return new DOMParser().parseFromString(response.text, 'text/html');
} |
e8f8c96
to
9da746c
Compare
I've removed the |
The test was removed in #1192 due to intermittent failures like these: ``` FAIL src/lib/steps/site-data.spec.ts > Blueprint step setSiteOptions() > should set the site option ``` They seem related to #1189, but all the other tests pass and the Playground website works so I wonder what's going on there. Is the CI runner just running out of memory? But then it shouldn't be able to allocate the memory segment in the first place. Weird!
Question @dmsnell and @adamziel - I was looking at the discussion about data liberation
On data liberationIs WXR the right format? PortabilityMoving from one instance to another should be what Playground does. Exit planFormat the data so the user can take it with them, wherever they go Can we discuss? 😎 |
@flexseth WXR is for moving content, as in posts, pages etc. It won't move custom database tables and has some problems with media files, though. I'd rather not spend time on expanding it. Site Transfer Protocol and Playground Snapshots will enable moving sites between Playgrounds and WordPress hosts. |
@flexseth to add to what @adamziel wrote, I think these are great questions, but mostly unrelated to this PR. it would be nice to join the discussion in WordPress.org Slack in the Personal opinion time: I think it's valuable to do a proper job with our existing commitments while also exploring new ideas. This PR I think is working to ensure that we do well the things we say we do, while leaving the door open to other kinds of imports. |
@dmsnell sounds good! I'll link the PR in the docs on importing and exporting with Playground for future discussions! |
The test was removed in #1192 due to intermittent failures like these: ``` FAIL src/lib/steps/site-data.spec.ts > Blueprint step setSiteOptions() > should set the site option ``` They seem related to #1189, but all the other tests pass and the Playground website works so I wonder what's going on there. Is the CI runner just running out of memory? But then it shouldn't be able to allocate the memory segment in the first place. Weird!
The test was removed in #1192 due to intermittent failures like these: ``` FAIL src/lib/steps/site-data.spec.ts > Blueprint step setSiteOptions() > should set the site option ``` ![CleanShot 2024-04-04 at 13 09 25@2x](https://github.com/WordPress/wordpress-playground/assets/205419/fe68c5ff-80a7-4966-82a8-fbfcc7e9a101) They seem related to #1189, but: * I can't reproduce it locally * The test actually passed in #1189 and only started failing in #1192 * All the other tests pass and the Playground website works so I wonder what's going on there. * The stack trace mentions network activity, but that call shouldn't involve any. It's almost as if the trace was coming from `php-networking.spec.ts`, but those tests actually pass. Is the CI runner just running out of memory? But then it shouldn't be able to allocate the memory segment in the first place. Weird! CC @brandonpayton for insights
Problem addressed
The importFile step works by interacting with HTML form like a user would. Problem is, the WXR importer requires some interactions with the forms which we fake by adjusting the POST data before submitting the form. This approach causes a number of issues listed below.
More context: #1183.
Implementation
Refactors the importFile Blueprint step to:
more reliable than the official wordpress-importer and has a
convenient PHP API.
value.
wp-now
Testing instructions
Closes #1183
Closes #379
Closes #1158
Closes #1161
cc @dmsnell