Closed Luxamman closed 2 years ago
Hi @Luxamman
Can you find a procedure we can follow to reproduce this issue?
Not sure, the only procedure I can think about is to create several pods and fields in Pods 2.7.x and update it to 2.8.x.
This site uses 8 custom post types and extends the products in WooCommerce. So maybe its also because we use about 57 fields in those 9 pods? Is there a routine migrating the pods or searching for existing pods?
--
I could export the two pods from a older version of the site, using Pods 2.7.30 - hopefully the import works now:
{"meta":{"version":"2.7.30","build":1640685157},"pods":{"10342":{"id":10342,"name":"knstler","label":"Künstler","description":"","type":"post_type","storage":"meta","object":"","alias":"","fields":{"text_de":{"id":10352,"name":"text_de","label":"Text DE","description":"","help":"","class":"","type":"wysiwyg","weight":0,"pick_object":"","pick_val":"","sister_id":"","required":"0","wysiwyg_editor":"tinymce","wysiwyg_media_buttons":"1","wysiwyg_oembed":"0","wysiwyg_wptexturize":"1","wysiwyg_convert_chars":"1","wysiwyg_wpautop":"1","wysiwyg_allow_shortcode":"0","oembed_enabled_providers_facebookcom":"0","oembed_enabled_providers_hulucom":"0","oembed_enabled_providers_instagramcom":"0","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","unique":"0","wysiwyg_repeatable":0,"wysiwyg_editor_height":"","wysiwyg_allowed_html_tags":""},"text_en":{"id":10353,"name":"text_en","label":"Text EN","description":"","help":"","class":"","type":"wysiwyg","weight":1,"pick_object":"","pick_val":"","sister_id":"","required":"0","wysiwyg_editor":"tinymce","wysiwyg_media_buttons":"1","wysiwyg_oembed":"0","wysiwyg_wptexturize":"1","wysiwyg_convert_chars":"1","wysiwyg_wpautop":"1","wysiwyg_allow_shortcode":"0","oembed_enabled_providers_facebookcom":"0","oembed_enabled_providers_hulucom":"0","oembed_enabled_providers_instagramcom":"0","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","unique":"0","wysiwyg_repeatable":0,"wysiwyg_editor_height":"","wysiwyg_allowed_html_tags":""},"text_fr":{"id":10354,"name":"text_fr","label":"Text FR","description":"","help":"","class":"","type":"wysiwyg","weight":2,"pick_object":"","pick_val":"","sister_id":"","required":"0","wysiwyg_editor":"tinymce","wysiwyg_media_buttons":"1","wysiwyg_oembed":"0","wysiwyg_wptexturize":"1","wysiwyg_convert_chars":"1","wysiwyg_wpautop":"1","wysiwyg_allow_shortcode":"0","oembed_enabled_providers_facebookcom":"0","oembed_enabled_providers_hulucom":"0","oembed_enabled_providers_instagramcom":"0","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","unique":"0","wysiwyg_repeatable":0,"wysiwyg_editor_height":"","wysiwyg_allowed_html_tags":""}},"show_in_menu":"1","label_singular":"Künstler","public":"0","show_ui":"1","supports_title":"1","supports_editor":"0","publicly_queryable":"0","exclude_from_search":"0","capability_type":"post","capability_type_custom":"knstler","capability_type_extra":"1","has_archive":"0","hierarchical":"0","rewrite":"1","rewrite_with_front":"1","rewrite_feeds":"0","rewrite_pages":"1","query_var":"1","can_export":"1","default_status":"draft","supports_author":"0","supports_thumbnail":"0","supports_excerpt":"0","supports_trackbacks":"0","supports_custom_fields":"0","supports_comments":"0","supports_revisions":"0","supports_page_attributes":"0","supports_post_formats":"0","built_in_taxonomies_category":"0","built_in_taxonomies_elementor_font_type":"0","built_in_taxonomies_elementor_library_category":"0","built_in_taxonomies_elementor_library_type":"0","built_in_taxonomies_jahr":"0","built_in_taxonomies_link_category":"0","built_in_taxonomies_pa_epoche":"0","built_in_taxonomies_pa_zeitraum":"0","built_in_taxonomies_post_tag":"0","built_in_taxonomies_product_cat":"0","built_in_taxonomies_product_shipping_class":"0","built_in_taxonomies_product_tag":"0","built_in_taxonomies_product_type":"0","built_in_taxonomies_product_visibility":"0","built_in_taxonomies_sc_tag":"0","built_in_taxonomies_translation_priority":"0","built_in_taxonomies_wpmf-category":"0","menu_position":"0","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"},"648":{"id":648,"name":"product","label":"Product","description":"","type":"post_type","storage":"meta","object":"product","alias":"","fields":{"date_from":{"id":1609,"name":"date_from","label":"Date from","description":"","help":"","class":"","type":"number","weight":0,"pick_object":"","pick_val":"","sister_id":"","required":"0","number_format_type":"number","number_format":"9999,99","number_decimals":"0","number_format_soft":"0","number_step":"1","number_min":"0","number_max":"100","number_max_length":"4","oembed_enabled_providers_facebookcom":"0","oembed_enabled_providers_hulucom":"0","oembed_enabled_providers_instagramcom":"0","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","unique":"0","number_repeatable":"0","number_placeholder":""},"date_to":{"id":1610,"name":"date_to","label":"Date to","description":"Leer lassen wenn nur ein Datum","help":"","class":"","type":"number","weight":1,"pick_object":"","pick_val":"","sister_id":"","required":"0","number_format_type":"number","number_format":"9999,99","number_decimals":"0","number_format_soft":"0","number_step":"1","number_min":"0","number_max":"100","number_max_length":"4","oembed_enabled_providers_facebookcom":"0","oembed_enabled_providers_hulucom":"0","oembed_enabled_providers_instagramcom":"0","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","unique":"0","number_repeatable":"0","number_placeholder":""},"expertise":{"id":1885,"name":"expertise","label":"Expertise","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":"0","oembed_enabled_providers_facebookcom":"0","oembed_enabled_providers_hulucom":"0","oembed_enabled_providers_instagramcom":"0","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","unique":"0","paragraph_repeatable":"0","paragraph_placeholder":""},"technique":{"id":1969,"name":"technique","label":"Technique","description":"","help":"","class":"","type":"text","weight":3,"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":"255","oembed_enabled_providers_facebookcom":"0","oembed_enabled_providers_hulucom":"0","oembed_enabled_providers_instagramcom":"0","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","unique":"0","text_repeatable":"0","text_placeholder":""},"artist":{"id":651,"name":"artist","label":"Künstler","description":"","help":"","class":"","type":"pick","weight":4,"pick_object":"post_type","pick_val":"knstler","sister_id":"","required":"0","oembed_enabled_providers_facebookcom":"0","oembed_enabled_providers_hulucom":"0","oembed_enabled_providers_instagramcom":"0","pick_format_type":"single","pick_format_single":"dropdown","pick_format_multi":"checkbox","pick_display_format_multi":"default","pick_display_format_separator":", ","pick_allow_add_new":"0","pick_taggable":"0","pick_show_icon":"1","pick_show_edit_link":"1","pick_show_view_link":"1","pick_limit":"0","pick_user_role":[],"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","unique":"0","pick_select_text":"","pick_table_id":"","pick_table_index":"","pick_display":"","pick_where":"","pick_orderby":"","pick_groupby":""},"ausfhrung":{"id":10379,"name":"ausfhrung","label":"Ausführung","description":"","help":"","class":"","type":"pick","weight":5,"pick_object":"post_type","pick_val":"ausfhrung","sister_id":"","required":"0","oembed_enabled_providers_facebookcom":"0","oembed_enabled_providers_hulucom":"0","oembed_enabled_providers_instagramcom":"0","pick_format_type":"single","pick_format_single":"dropdown","pick_format_multi":"checkbox","pick_display_format_multi":"default","pick_display_format_separator":", ","pick_allow_add_new":"0","pick_taggable":"0","pick_show_icon":"1","pick_show_edit_link":"1","pick_show_view_link":"1","pick_limit":"0","pick_user_role":[],"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","unique":"0","pick_select_text":"","pick_table_id":"","pick_table_index":"","pick_display":"","pick_where":"","pick_orderby":"","pick_groupby":""},"kunstgeschichte":{"id":10380,"name":"kunstgeschichte","label":"Kunstgeschichte","description":"","help":"","class":"","type":"pick","weight":6,"pick_object":"post_type","pick_val":"kunstgeschichte","sister_id":"","required":"0","oembed_enabled_providers_facebookcom":"0","oembed_enabled_providers_hulucom":"0","oembed_enabled_providers_instagramcom":"0","pick_format_type":"single","pick_format_single":"dropdown","pick_format_multi":"checkbox","pick_display_format_multi":"default","pick_display_format_separator":", ","pick_allow_add_new":"0","pick_taggable":"0","pick_show_icon":"1","pick_show_edit_link":"1","pick_show_view_link":"1","pick_limit":"0","pick_user_role":[],"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","unique":"0","pick_select_text":"","pick_table_id":"","pick_table_index":"","pick_display":"","pick_where":"","pick_orderby":"","pick_groupby":""}},"show_in_menu":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"}}}
Hi @Luxamman
Can you reproduce the same issue on a fresh install with only Pods active? If you do not have the possibility to create a test installation you can install Local from Flywheel: https://localwp.com/
Tried it in localwp (prepared a ZIP file as base to try it again), but everything seems to be okay after updating. Installed as much plugins as possible like on the live site (at least the non pro plugins...) and imported lot of content and products. Do you think it could be a plugin making problems?
Can we go back to 2.7.31 or is this maybe making problems? Or is there a function to make pods search for fields again?
Hi @Luxamman
This indeed sounds like a plugin conflict. Please recreate your live site in full (including all plugins and the full database) to try and reproduce the issue.
Same issue here. Pod showing field quantity correct but no fields in the edit box in Pods.
I'm on Pods v2.8.8.1 and WordPress v5.8.3. All plugins except Pods deactivated and default WordPress Twenty Twenty One active. (Was using Bricks builder/theme to build the page at the time). Only Updraft Backup and Happyfiles were installed at any time in this install. No WooCommerce and no extending another post type.
The issue seemed to arise after either or both of the following:
I renamed fields that were used for a relationship, though that only broke the ability to add content as far as I can tell.
I also duplicated pods. An original Pod is fine, but it creates a problem blank duplicate with the correct 9 field count. A duplicate of the problem pod shows 0 fields. I can add new fields to the problem pod that work fine and the original invisible (in the Pods editor) fields show up OK in WordPress and the REST API JSON output.
From what I can see, all duplicated Pods now have this issue. Original is good... Copy shows correct field count, but when you click on it, it's empty inside. A copy of that copy shows 0 field count.
Haven't been able to reproduce the problem so far. Have a local installation with all plugins running, the update seemed to run normally.
The old fields are no longer available in the "pods editor", but if I want to create a field with the same name as before: "Field not added, it already exists."
So till now I have no idea how to fix that problem...
Could it be that we have double entries in the DB which then cause problems? Here are some entries from the DB: different IDs and names, but exactly the same content or just a few characters differ in option_value:
Two times exactly the same character number:
Two times exactly the same character number in ID 1062974 and 1063290, the ID 1063230 entry has a few characters less:
As you can see the option_value of those entries starts with exactly the same characters. Is that normal to have multiple entries in options?
@Luxamman Those transients are all related to cached datasets. They all start the same and may even have the same results but they are actually different queries (based on the unique MD5 key generated for that unique cache key).
It sounds like there may have been a number of fields "orphaned" by the upgrade process due to an unknown factor.
To recover orphaned fields, you can go edit that pod in question and add this to the URL: &pods_debug_find_orphan_fields=1
and it will run an orphan check. If it finds orphaned fields, it will automatically assign them to the first group.
Let us know if that doesn't immediately resolve your problem here.
Thanks for your answers, after running the orphaned fields check, the fields are back again!
Thanks a lot, this saves a lot of time. Seems the update to 2.8 has made problems here... maybe in combination with other plugins. Maybe it would be nice to have a button for that function in the settings next to "Clear Pods Cache" or so if those problems will appear again.
Thanks again!
I'll look at adding a button or link somewhere in the edit pod screen, will see what makes sense there
I can't say if that would have worked in my case, as I deleted the entire Pods and restarted building fields in them. I'm afraid to run that check in case it creates problems. Is there a way to just check if orphan fields exist without changing anything?
As for adding a button, I wonder if an automatic check and a warning or prompt might be better than having a button. Adding a button would presume that a user knows an issue is due to orphan fields. I'm assuming orphan fields are not a feature.
@Codesign8 The orphan fields check is non-destructive, it will only modify fields that literally have no group assigned to them yet.
It's a process that normally happens on the first pod edit after upgrading to Pods 2.8+, but that special query string added to the URL will re-run that step.
I wanted to avoid an extra query on every edit pod screen page load, but it might be unavoidable if we only want to show the orphan field check button in those cases.
Just updating here -- I added a check in Pods 2.8.9 which will auto-detect a field count mismatch, it should cover almost every remaining case which will reduce/remove the need for adding a link/button.
Thanks, hope this helps in the future!
What I also found out just yesterday - are the settings of an Pod also checked with this check? Seems like the settings are sometimes also not transfered from 2.7 to 2.8.
Two screenshots of settings of an Pod before and after the update: Before in 2.7:
After in 2.8:
As you can see, most of the settings are just gone. We have some weird problems with translating with WPML (because we can not reach the fields in other languages than the main language) and that's why I found out about the settings...
@Luxamman I wasn't able to reproduce this with your 2.7.x package you posted earlier. Can you post a new issue about it with any other details you can?
I went to 2.7.31 and imported the package. Then I updated to 2.8.8.1 (and the new 2.8.9 version) but didn't see the values not showing up as set correctly.
Description
After the update to 2.8.x some pods fields are not showing in some pods, but they still work in fronted and are (sometimes) shown in the pods admin overview with the correct number of fields.
--
In the first case, we extend Woo Commerce products, we have one group with 9 fields. Fields are counted right in the pods admin overview, but no fields when try to edit the pod. But they work in front-end via short code and when editing products.
Second case is a simple pod with 3 fields also shown in products, but as a own pod connected via relationship. The fields number count is not shown in the pods admin overview anymore, but are still working to show stuff at front end. But no more pod editing in pods admin and also no editing in the pod own WP menu.
Note: I exported the pods package, but at fields it seems to be completely empty. So not sure if you can import them.
So it seems that the already existing fields are still existing in the DB and information is loaded correctly. But it seems that the pods admin does forget about the building information of some of the pods, or, even if he still can count the fields right, he cannot edit the fields anymore.
--
Downgraded from 2.8.8.1 to 2.8.8 after error: https://github.com/pods-framework/pods/issues/6363
Version
2.8.8
Testing Instructions
No response
Screenshots / Screencast
Pods admin: Fields count for extended product is correct, fields count in custom post knstler are gone:
No fields in custom artist post type, but fields are still working in front end via shortcode [pods] with {@artist.text.de}:
No more fields in extended product:
Possible Workaround
No workaround as far as we know.
Site Health Information
Pods Package