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

Component: Convert Pod Type #434

Closed
manastalukdar opened this issue Sep 24, 2012 · 22 comments
Closed

Component: Convert Pod Type #434

manastalukdar opened this issue Sep 24, 2012 · 22 comments
Labels
Status: Help Wanted We have not prioritized this yet, but you can help make it happen to speed it up Status: Need Tasklist The work requires a tasklist to be created in order to ensure all parts involved are completed

Comments

@manastalukdar
Copy link

This is a feature request. Please support migration between (both to and from) Custom Post Type Pod and Advanced Content Type Pod. While migrating to custom post type Pod provide option of using default native WP table or separate table.

@sc0ttkclark
Copy link
Member

Great idea, this was roadmapped but didn't have an issue added for it yet. I've added it, hopefully we can get to it in time for 2.1

@estevanix
Copy link

Hey, any news on this feature?

@sc0ttkclark
Copy link
Member

It requires work to be done on #283 which handles migration of data that this will need. I'm anxious to get this done, but there are a few other things ahead of it unfortunately.

@estevanix
Copy link

Thanks scott! You guys are doing a fantastic work!

@sc0ttkclark
Copy link
Member

We're looking for more contributors if you're interested in helping out anywhere. Anything not marked as 'in progress' is open to contributions.

@ghost
Copy link

ghost commented Sep 7, 2013

Any updates on this feature? Or, does anyone know of a tutorial anywhere that could help me accomplish this manually? I created some pods in Pods 1.x, which have been upgraded to Pods 2.x and are now Advanced Content Types. I think I'd like to convert them to Custom Post Types without breaking the functionality of my custom Pods UI stuff, if possible, so that I can use the default WP search and have tighter integration with the rest of my site.

@sc0ttkclark
Copy link
Member

I'd like to get this one going too, it would be fantastic to be able to convert Pods between types. And as I think more about it, this may need to really be combined with #283 as some times (like in the case of ACT > CPT) it can make more sense to do both a type and storage conversion at the same time.

I think if we can at least cover converting an Advanced Content Type into a Custom Post Type, that'd be a great first version of this component

@forjoyilive
Copy link

This would be a real help to us as well. Is there any way to contribute? I wouldn't trust myself with #283, but may be able to do lighter programming or testing.

@sc0ttkclark
Copy link
Member

The main hold up on this and #283 are getting our '2.0 upgrade' script working to go through the content types being converted and move all of the data over to the new type (Post Type to Taxonomy, ACT to Post Type, etc). For #238, that's moving all of the Pod fields' meta over to the Table, or vice versa for Table to Meta convert. It's a tall order for anyone not already familiar with the upgrade script itself and how it works.

@c0rnbread
Copy link

Oh, this would be really cool.

@basepack
Copy link

Hey guys! Will this be implemented in Pods 2.4? That would be really awesome.

@sc0ttkclark
Copy link
Member

Update: We're actively working on this new feature plugin for release alongside Pods 3.0 or potentially sooner.

@forjoyilive
Copy link

That's great, thanks for the update. By the way Scott, thanks for your contributions to WordPress core, I think I've seen your name in the comments on one of the Make blogs.

@kenwiesner
Copy link

Any updates on this? In desperate need for this functionality.

@c0rnbread
Copy link

You can loop through your existing pod and create entries in a new pod with the add() function.

@sc0ttkclark
Copy link
Member

Technically, you can create a new Pod, name it something like "mypod2" and have it configured as the new content type you want it to be, then fetch through all the records and add them to it. Then, once done, delete the original "mypod" and rename the "mypod2" to "mypod".

@Shelob9
Copy link
Contributor

Shelob9 commented Feb 11, 2014

@c0rnbread Do you have an example function for this that you'd be willing to share? Could make a nice addition to our docs.

@kenwiesner
Copy link

@c0rnbread and @sc0ttkclark Thanks for the suggestion! I will give that a whirl. I don't know why I didn't think of that earlier. I was going to manually export the DB and import it using a plugin I have for importing CSV to CPTs but that would have been very messy. If I can come up with something intelligent I'll share. :)

@sc0ttkclark
Copy link
Member

FYI the main hold up on this converter is an efficient method of doing these things DB-based, instead of using the API, with bulk inserts etc, instead of reading everything into memory via PHP and the slowdowns everything to do with that entail.

@c0rnbread
Copy link

@Shelob9 No example function, sorry. I was speaking of the same process as Scott.

@manishie
Copy link

Hi All,
I have a CPT Pod with a huge number of fields in it, which now bogs down my server when I use it. I should have used ACT.

I can write a script to copy data from the old CPT to the new ACT as suggested above. But is there something I can do to convert the Pod definition from CPT to ACT? I've got a lot of fields in there and it would be a lot of manual work to recreate it. Thanks!

@sc0ttkclark
Copy link
Member

You could use this to convert the Pod, but it won't create the table or migrate the content over for you: update_post_meta( $pod_id, 'type', 'pod' );

@manishie
Copy link

Oh that will save a lot of work. Thanks! I'll manually create the db table and migrate then content, but at least I won't have to setup all the fields in pods again.

Thanks.

@sc0ttkclark sc0ttkclark added Plugin Material Status: Need Tasklist The work requires a tasklist to be created in order to ensure all parts involved are completed and removed Plugin: Migration labels Dec 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Help Wanted We have not prioritized this yet, but you can help make it happen to speed it up Status: Need Tasklist The work requires a tasklist to be created in order to ensure all parts involved are completed
Projects
None yet
Development

No branches or pull requests

9 participants