pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.07k stars 264 forks source link

Can't Migrate 8 PODs #5073

Open dawnbuie opened 6 years ago

dawnbuie commented 6 years ago

Describe the bug I can't migrate my 8 PODs to a new Wordpress install.

To Reproduce I have 8 functional PODs that are based on Page Types I turned on the Migrate Packages component and check all boxes. These are the results I get:

{"meta":{"version":"2.7.6","build":1532480499},"pods":[]}

I did try pasting that code in the Import Migrate section of the POD area in the new site but not surprisingly - it did nothing.

Expected behavior Have the POD types defined in the new Wordpress installation

Pods Version

Version 2.7.6

WordPress Environment

``` Copy and paste your System Details from **Pods Admin > Settings > Debug Information** in PHP Version: 7.1.9 MySQL Version: 5.7.20 Server Software: Apache Your User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:61.0) Gecko/20100101 Firefox/61.0 Session Save Path: /tmp Session Save Path Exists: Yes Session Save Path Writeable: Yes Session Max Lifetime: 1440 Opcode Cache: Apc: No Memcached: No OPcache: Yes Redis: No Object Cache: APC: No APCu: No Memcache: No Memcached: No Redis: No WPDB Prefix: wp_ WP Multisite Mode: No WP Memory Limit: 40M Pods Network-Wide Activated: No Pods Install Location: /var/home/libby/wp5.libbydavies.ca/www/wp-content/plugins/pods/ Pods Tableless Mode Activated: No Pods Light Mode Activated: No Currently Active Theme: Twenty Seventeen Currently Active Plugins: Pods - Custom Content Types and Fields: 2.7.6 WordPress Importer: 0.6.4 ```

Pods Package Export (helpful!)

Copy and Paste the JSON Export from **Pods Admin, Migrate: Packages, Export** in WordPress admin here

Additional context Add any other context about the problem here.

Possible Workaround If you have discovered a workaround, please include it below.

dawnbuie commented 6 years ago

OK - update - so I figured out my PODs were destroyed by a content import tool I was using DrupaltoWordpress Plugin.

I thought the pluging had worked perfectly - because I was able to assined the custom content type from Drupal to my newly created Wordpress PODs - and the populated the content types correctly! However when I went back to edit the PODs themselves I saw their pod names had been changed from something like 'update' to the title of the last Update items imported - with spaces so 'A Great Story about Surfing".

I then tried editing the POD name manually to set it back to 'update' but when I saved that I was locked out of the PODs Admin page - getting 'you are not allowed to access this page' message.

Luckily I had done many backup version of the database - so I restored the version before importing all that content - and then I was able to export the PODs and import into a new WP site.

However I still have this import issue. Why did the POD structural data get overwritten so easily? Would it be safer for me to enable the Table Storage component:

  | Enable a custom database table for your custom fields on Post Types, Media, Taxonomies, Users, and

Or the Advanced Content Types:

A content type that exists outside of the WordPress post and postmeta table and uses custom tables

I have made custom content types in WP manually before and I thought PODs would save me a lot of time (I love the HTML field options too) - but if they get destroyed/overwritten this easily I don't feel good using them.

Here is my export code for the PODs:

`{"meta":{"version":"2.7.6","build":1532523107},"pods":{"4178":{"id":4178,"name":"bills_and_motions","label":"Bills and Motions","description":"","type":"post_type","storage":"meta","object":"","alias":"","fields":[],"show_in_menu":"1","label_singular":"Bills and Motions","public":"1","show_ui":"1","supports_title":"1","supports_editor":"1","publicly_queryable":"1","exclude_from_search":"0","capability_type":"post","capability_type_custom":"bills_and_motions","capability_type_extra":"1","has_archive":"0","hierarchical":"0","rewrite":"1","rewrite_with_front":"0","rewrite_feeds":"0","rewrite_pages":"1","query_var":"1","can_export":"1","default_status":"draft","supports_author":"1","supports_thumbnail":"0","supports_excerpt":"1","supports_trackbacks":"0","supports_custom_fields":"0","supports_comments":"0","supports_revisions":"1","supports_page_attributes":"0","supports_post_formats":"0","built_in_taxonomies_category":"1","built_in_taxonomies_link_category":"0","built_in_taxonomies_post_tag":"1","show_in_nav_menus":"1","show_in_admin_bar":"1","pfat_enable":"0","pfat_run_outside_loop":"0","pfat_append_single":"append","pfat_filter_single":"the_content","pfat_append_archive":"append","pfat_filter_archive":"the_content","rest_enable":"0","read_all":"0","write_all":"0","rewrite_custom_slug":"parliament\/bills"},"4185":{"id":4185,"name":"libby_in_the_news","label":"Libby in the News","description":"Links to newspaper articles about Libby or articles Libby has written herself.","type":"post_type","storage":"meta","object":"","alias":"","fields":{"media_link":{"id":4186,"name":"media_link","label":"Media Link","description":"","help":"","class":"","type":"website","weight":0,"pick_object":"","pick_val":"","sister_id":"","required":"0","website_format":"none","website_allow_port":"0","website_clickable":"1","website_new_window":"1","website_max_length":"-1","website_html5":"1","website_placeholder":"External Url","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","website_repeatable":0},"media_source":{"id":4187,"name":"media_source","label":"Media Source","description":"","help":"","class":"","type":"text","weight":1,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"-1","text_placeholder":"Media Source","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","text_repeatable":0},"short_summary":{"id":4188,"name":"short_summary","label":"Short Summary","description":"","help":"","class":"","type":"paragraph","weight":2,"pick_object":"","pick_val":"","sister_id":"","required":"0","paragraph_allow_html":"1","paragraph_oembed":"0","paragraph_wptexturize":"1","paragraph_convert_chars":"1","paragraph_wpautop":"1","paragraph_allow_shortcode":"0","paragraph_allowed_html_tags":"strong em a ul ol li b i","paragraph_max_length":"-1","paragraph_placeholder":"Short Summary","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","paragraph_repeatable":0},"cover_date":{"id":4189,"name":"cover_date","label":"Cover Date","description":"","help":"","class":"","type":"datetime","weight":3,"pick_object":"","pick_val":"","sister_id":"","required":"0","datetime_type":"format","datetime_format":"c","datetime_time_type":"12","datetime_time_format":"h_mma","datetime_time_format_24":"hh_mm","datetime_allow_empty":"1","datetime_html5":"1","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","datetime_repeatable":0,"datetime_format_custom":"","datetime_format_custom_js":"","datetime_time_format_custom":"","datetime_time_format_custom_js":""},"story_author":{"id":4190,"name":"story_author","label":"Story Author","description":"","help":"","class":"","type":"text","weight":4,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"-1","text_placeholder":"Story Author","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","text_repeatable":0}},"show_in_menu":"1","label_singular":"Libby in the News ","public":"1","show_ui":"1","supports_title":"1","supports_editor":"1","publicly_queryable":"1","exclude_from_search":"0","capability_type":"post","capability_type_custom":"libby_in_the_news","capability_type_extra":"1","has_archive":"0","hierarchical":"0","rewrite":"1","rewrite_custom_slug":"news\/articles","rewrite_with_front":"0","rewrite_feeds":"0","rewrite_pages":"1","query_var":"1","can_export":"1","default_status":"draft","supports_author":"1","supports_thumbnail":"0","supports_excerpt":"0","supports_trackbacks":"0","supports_custom_fields":"0","supports_comments":"0","supports_revisions":"1","supports_page_attributes":"0","supports_post_formats":"0","built_in_taxonomies_category":"1","built_in_taxonomies_link_category":"0","built_in_taxonomies_post_tag":"1","show_in_nav_menus":"1","show_in_admin_bar":"1","pfat_enable":"0","pfat_run_outside_loop":"0","pfat_append_single":"append","pfat_filter_single":"the_content","pfat_append_archive":"append","pfat_filter_archive":"the_content","rest_enable":"0","read_all":"0","write_all":"0"},"4179":{"id":4179,"name":"open_letter","label":"Open Letters","description":"Open Letter to Ministers & Public Officials. These are letters Libby writes on a topics she feels strongly about. She directs the letter to a minister and forwards the letter widely.","type":"post_type","storage":"meta","object":"","alias":"","fields":[],"show_in_menu":"1","label_singular":"Open Letter","public":"1","show_ui":"1","supports_title":"1","supports_editor":"1","publicly_queryable":"1","exclude_from_search":"0","capability_type":"post","capability_type_custom":"open_letter","capability_type_extra":"1","has_archive":"0","hierarchical":"0","rewrite":"1","rewrite_custom_slug":"parliament\/openletter","rewrite_with_front":"0","rewrite_feeds":"0","rewrite_pages":"1","query_var":"1","can_export":"1","default_status":"draft","supports_author":"1","supports_thumbnail":"0","supports_excerpt":"1","supports_trackbacks":"0","supports_custom_fields":"0","supports_comments":"0","supports_revisions":"1","supports_page_attributes":"0","supports_post_formats":"0","built_in_taxonomies_category":"1","built_in_taxonomies_link_category":"0","built_in_taxonomies_post_tag":"1","show_in_nav_menus":"1","show_in_admin_bar":"1","pfat_enable":"0","pfat_run_outside_loop":"0","pfat_append_single":"append","pfat_filter_single":"the_content","pfat_append_archive":"append","pfat_filter_archive":"the_content","rest_enable":"0","read_all":"0","write_all":"0"},"4177":{"id":4177,"name":"press_release","label":"Press Releases","description":"","type":"post_type","storage":"meta","object":"","alias":"","fields":[],"show_in_menu":"1","label_singular":"Press Release","public":"1","show_ui":"1","supports_title":"1","supports_editor":"1","publicly_queryable":"1","exclude_from_search":"0","capability_type":"post","capability_type_custom":"press_release","capability_type_extra":"1","has_archive":"0","hierarchical":"0","rewrite":"1","rewrite_custom_slug":"news\/pressrelease","rewrite_with_front":"0","rewrite_feeds":"0","rewrite_pages":"1","query_var":"1","can_export":"1","default_status":"publish","supports_author":"1","supports_thumbnail":"0","supports_excerpt":"1","supports_trackbacks":"0","supports_custom_fields":"0","supports_comments":"0","supports_revisions":"1","supports_page_attributes":"0","supports_post_formats":"0","built_in_taxonomies_category":"1","built_in_taxonomies_link_category":"0","built_in_taxonomies_post_tag":"1","show_in_nav_menus":"1","show_in_admin_bar":"1","pfat_enable":"0","pfat_run_outside_loop":"0","pfat_append_single":"append","pfat_filter_single":"the_content","pfat_append_archive":"append","pfat_filter_archive":"the_content","rest_enable":"0","read_all":"0","write_all":"0"},"4180":{"id":4180,"name":"question_period","label":"Question Period Transcripts","description":"Transcript of Libby asking a question in Parliament. Taken from the Hansard. Always a minute with a reply. It would be good to attach audio and video if available.","type":"post_type","storage":"meta","object":"","alias":"","fields":[],"show_in_menu":"1","label_singular":"Question Period Transcript","public":"1","show_ui":"1","supports_title":"1","supports_editor":"1","publicly_queryable":"1","exclude_from_search":"0","capability_type":"post","capability_type_custom":"question_period","capability_type_extra":"1","has_archive":"0","hierarchical":"0","rewrite":"1","rewrite_custom_slug":"parliament\/questionperiod","rewrite_with_front":"0","rewrite_feeds":"0","rewrite_pages":"1","query_var":"1","can_export":"1","default_status":"draft","supports_author":"1","supports_thumbnail":"0","supports_excerpt":"1","supports_trackbacks":"0","supports_custom_fields":"0","supports_comments":"0","supports_revisions":"1","supports_page_attributes":"0","supports_post_formats":"0","built_in_taxonomies_category":"1","built_in_taxonomies_link_category":"0","built_in_taxonomies_post_tag":"1","show_in_nav_menus":"1","show_in_admin_bar":"1","pfat_enable":"0","pfat_run_outside_loop":"0","pfat_append_single":"append","pfat_filter_single":"the_content","pfat_append_archive":"append","pfat_filter_archive":"the_content","rest_enable":"0","read_all":"0","write_all":"0"},"4181":{"id":4181,"name":"speeches_parliament","label":"Speech in Parliament","description":"These are either 10 or 20 minutes long. These are transcripts of speeches Libby makes in the House on topics such as anti-terrorism. After the speech there is an either 5 or 10 minute period for questions.","type":"post_type","storage":"meta","object":"","alias":"","fields":[],"show_in_menu":"1","label_singular":"Speech in Parliament","public":"1","show_ui":"1","supports_title":"1","supports_editor":"1","publicly_queryable":"1","exclude_from_search":"0","capability_type":"post","capability_type_custom":"speeches_parliament","capability_type_extra":"1","has_archive":"0","hierarchical":"0","rewrite":"1","rewrite_custom_slug":"parliament\/speech","rewrite_with_front":"0","rewrite_feeds":"0","rewrite_pages":"1","query_var":"1","can_export":"1","default_status":"draft","supports_author":"1","supports_thumbnail":"0","supports_excerpt":"1","supports_trackbacks":"0","supports_custom_fields":"0","supports_comments":"0","supports_revisions":"1","supports_page_attributes":"0","supports_post_formats":"0","built_in_taxonomies_category":"1","built_in_taxonomies_link_category":"0","built_in_taxonomies_post_tag":"1","show_in_nav_menus":"1","show_in_admin_bar":"1","pfat_enable":"0","pfat_run_outside_loop":"0","pfat_append_single":"append","pfat_filter_single":"the_content","pfat_append_archive":"append","pfat_filter_archive":"the_content","rest_enable":"0","read_all":"0","write_all":"0"},"4184":{"id":4184,"name":"statements","label":"Statement in the House","description":"These are transcripts of 1 minute long statements Libby makes in the House every few weeks.","type":"post_type","storage":"meta","object":"","alias":"","fields":[],"show_in_menu":"1","label_singular":"Statement in the House","public":"1","show_ui":"1","supports_title":"1","supports_editor":"1","publicly_queryable":"1","exclude_from_search":"0","capability_type":"post","capability_type_custom":"statement_in_the_hou","capability_type_extra":"1","has_archive":"0","hierarchical":"0","rewrite":"1","rewrite_custom_slug":"parliament\/statement","rewrite_with_front":"0","rewrite_feeds":"0","rewrite_pages":"1","query_var":"1","can_export":"1","default_status":"draft","supports_author":"1","supports_thumbnail":"0","supports_excerpt":"1","supports_trackbacks":"0","supports_custom_fields":"0","supports_comments":"0","supports_revisions":"1","supports_page_attributes":"0","supports_post_formats":"0","built_in_taxonomies_category":"1","built_in_taxonomies_link_category":"0","built_in_taxonomies_post_tag":"1","show_in_nav_menus":"1","show_in_admin_bar":"1","pfat_enable":"0","pfat_run_outside_loop":"0","pfat_append_single":"append","pfat_filter_single":"the_content","pfat_append_archive":"append","pfat_filter_archive":"the_content","rest_enable":"0","read_all":"0","write_all":"0"},"4182":{"id":4182,"name":"updates","label":"Updates from Libby","description":"Content from the neighbourhood mailouts that gets pasted into these kinds of articles for the website.","type":"post_type","storage":"meta","object":"","alias":"","fields":{"attached_file":{"id":4183,"name":"attached_file","label":"Attached File","description":"","help":"","class":"","type":"file","weight":0,"pick_object":"custom-simple","pick_val":"","sister_id":"","required":"0","file_format_type":"multi","file_uploader":"attachment","file_attachment_tab":"upload","file_edit_title":"1","file_show_edit_link":"1","file_linked":"1","file_limit":"0","file_restrict_filesize":"10MB","file_type":"any","file_field_template":"rows","file_add_button":"Add File","file_modal_title":"Attach a file","file_modal_add_button":"Add File","file_wp_gallery_output":"0","file_wp_gallery_link":"post","file_wp_gallery_columns":"1","file_wp_gallery_random_sort":"0","file_wp_gallery_size":"thumbnail","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","file_allowed_extensions":""}},"show_in_menu":"1","label_singular":"Update from Libby","public":"1","show_ui":"1","supports_title":"1","supports_editor":"1","publicly_queryable":"1","exclude_from_search":"0","capability_type":"post","capability_type_custom":"updates","capability_type_extra":"1","has_archive":"0","hierarchical":"0","rewrite":"1","rewrite_custom_slug":"news\/update","rewrite_with_front":"0","rewrite_feeds":"0","rewrite_pages":"1","query_var":"1","can_export":"1","default_status":"draft","supports_author":"1","supports_thumbnail":"0","supports_excerpt":"1","supports_trackbacks":"0","supports_custom_fields":"0","supports_comments":"0","supports_revisions":"1","supports_page_attributes":"0","supports_post_formats":"0","built_in_taxonomies_category":"1","built_in_taxonomies_link_category":"0","built_in_taxonomies_post_tag":"1","show_in_nav_menus":"1","show_in_admin_bar":"1","pfat_enable":"0","pfat_run_outside_loop":"0","pfat_append_single":"append","pfat_filter_single":"the_content","pfat_append_archive":"append","pfat_filter_archive":"the_content","rest_enable":"0","read_all":"0","write_all":"0"}}}`
sc0ttkclark commented 6 years ago

It sounds like a few things may be happening here:

Nothing you have described seems to be Pods-specific. I really do wish it was so we could fix it all for you. I'm sorry you experienced this problem with that script, I hope your setup is working for you now that you were able to to the backup/restore.

dawnbuie commented 6 years ago

Hi there - thanks for the reply. I did try some other migrations scripts that did the same thing - and every realized:

Pods configurations are stored as post types. If a plugin deletes all posts, then the configurations get lost at the same time

That's why I asked about protecting existing PODs but turning on the Table Storage component:

  | Enable a custom database table for your custom fields on Post Types, Media, Taxonomies, Users, and

I did try that but it didn't seem to have an effect.

sc0ttkclark commented 6 years ago

Pods hooks into the normal post/meta API, so even though it's content could be stored in a table, that does not mean it gets retained. If wp_delete_post is called, it will delete that data wherever it exists.