-
Notifications
You must be signed in to change notification settings - Fork 30
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
Export & Import #655
Export & Import #655
Conversation
PR Summary
|
Dear @mauteri , while this is still not ready, needs a lot of docs, etc. I would like to have your feedback on the initial direction. Could you take a look at the code I have here so far? This would be nice! |
Sure, I can start testing this. My time schedule has been a bit crazy lately, but I'll look to carve out time soon to test this. Thanks! |
@carstingaxion I tried exporting and importing, but the datetime start and end data was not imported. Maybe we should screenshare on this one when you have some time so you can take me through this. thx! |
This is working for me, though I'm not 100% sure why - I can't seem to find where the export is storing the event date? Otherwise - all meta is storing as expected:
The only other issue I noticed (which I'm not sure we can get around) is that when you import both venues and events, it can't retain the link an event has to a venue, since the IDs have changed. |
IDs shouldn't matter as the CPT and taxonomy term are tied by slug which won't change. Also the binding of Event to Venue is just a normal taxonomy term, nothing fancy. I'll have to test this again. |
Thanks for trying and testing @stephenerdelyi and @mauteri !! I made a short screencast to show the walk-through (for you, me and all others) Bildschirmaufzeichnung.vom.14.05.2024.13.19.29.mp4I took that date, because I read somewhere in a slack-channel that it is a kind of special holiday in New York. 🥳 🎈 |
Have a look at the exported .xml file @stephenerdelyi , there should be a section at the end of the postmeta data, that looks like this and contains all data: <wp:postmeta>
<wp:meta_key><![CDATA[gatherpress_datetimes]]></wp:meta_key>
<wp:meta_value><![CDATA[a:5:{s:14:"datetime_start";s:19:"2024-05-11 18:00:00";s:18:"datetime_start_gmt";s:19:"2024-05-11 22:00:00";s:12:"datetime_end";s:19:"2024-05-11 20:00:00";s:16:"datetime_end_gmt";s:19:"2024-05-12 00:00:00";s:8:"timezone";s:16:"America/New_York";}]]></wp:meta_value>
</wp:postmeta> |
*/ | ||
add_filter( 'wp_import_post_data_raw', array( '\GatherPress\Core\Import', 'set_entry_point' ) ); | ||
} | ||
add_action( 'gatherpress_import', array( '\GatherPress\Core\Import', 'import' ) ); |
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.
Same here, just call Import
after including use
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.
I thought I understood what you meant, but went with self::class
, because I'm referencing only static functions.
But I'm still not sure, about it.
Will this work and be ok?
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.
Can you please have a Quick Look at this Long open review comment @mauteri ?
Even all checks pass now, we still have:
|
Technically finished @mauteri . Nice to have, still remain:
|
✅ Tests = PASS July 13
@carstingaxion @mauteri practical tests look good. Recommend merging or more advanced testing if needed. |
… the code in the plugin.
@carstingaxion @MervinHernandez I made some small changes to the code to make it look more like the rest of the code in the plugin (removal of static methods). I think this is good to go. I just did an export/import test and it worked great. We should continue to test as we work on the next release. Thanks! |
Description of the Change
Closes #650
How to test the Change
Changelog Entry
Credits
Props @carstingaxion
Checklist:
wtd:summary