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

Update to 2.8.5 from 2.7.31 changes custom field type #6326

Open cfaria opened 2 years ago

cfaria commented 2 years ago

Description

Hi,

I've created some custom fields to extend the WooCommerce Product Post type. Among them are relationships, images, plain text, WYSIWYG, etc... It works great in 2.7.31 but when I upgrade to 2.8.X (it doesn't matter wich 2.8 version) there is a relationship field that changes to plain text type as soon as I upgrade.

As a result of that change, if I try to get the custom relationship field value with get_post_meta, it returns a empty string.

I'll have a look if that happens with other fields in other CPTs and extended CPTs I have in the same project. This is the first one I've found that is happening.

Look at the screenshots to see the problem. The teacher field is converted from relationship to plain text. The rest of the fields seem to be ok. Also the fields order has changed too...

The Pods Package I'm sending is from the 2.7.31 export.

Version

2.8.5

Testing Instructions

No response

Screenshots / Screencast

2.7.31 Extended Product CPT Pods edit screen Screenshot

Captura de pantalla 2021-11-23 a las 9 50 11

2.8.5 Extended Product CPT Pods edit screen Screenshot

Captura de pantalla 2021-11-23 a las 9 52 40

Possible Workaround

No response

Site Health Information

`
### wp-core ###

version: 5.8.1
site_language: es_ES
user_language: es_ES
timezone: Europe/Madrid
permalink: /%postname%/
https_status: false
multisite: false
user_registration: 0
blog_public: 1
default_comment_status: open
environment_type: production
user_count: 45898
dotorg_communication: true

### wp-paths-sizes ###

wordpress_path: /Users/carlos/Sites/domain.com/web/wp
wordpress_size: loading...
uploads_path: /Users/carlos/Sites/domain.com/web/app/uploads
uploads_size: loading...
themes_path: /Users/carlos/Sites/domain.com/web/app/themes
themes_size: loading...
plugins_path: /Users/carlos/Sites/domain.com/web/app/plugins
plugins_size: loading...
database_size: loading...
total_size: loading...

### wp-active-theme ###

name: hc
version: 2.20.1
author: Supermundano
author_website: https://supermudano.com/
parent_theme: none
theme_features: core-block-patterns, widgets-block-editor, post-thumbnails, soil-disable-trackbacks, soil-jquery-cdn, soil-js-to-footer, soil-nav-walker, soil-nice-search, soil-relative-urls, title-tag, menus, html5, woocommerce, widgets, editor-style
theme_path: /Users/carlos/Sites/domain.com/web/app/themes/domainv2

### wp-mu-plugins (5) ###

Bedrock Autoloader: version: 1.0.0, author: Roots
Disable plugins on development: version: 1.0.0, author: Supermundano
Disallow Indexing: version: 1.0.0, author: Roots
LearnDash LMS Multisite: version: 1.0.0, author: LearnDash
Register Theme Directory: version: 1.0.0, author: Roots

### wp-plugins-active (38) ###

Advanced Custom Fields PRO: version: 5.10.2, author: Delicious Brains
Advanced Order Export For WooCommerce: version: 3.1.9, author: AlgolPlus (latest version: 3.2.1)
AffiliateWP: version: 2.7.5, author: Sandhills Development, LLC
Akismet Anti-Spam: version: 4.2.1, author: Automattic
bbPress: version: 2.6.6, author: The bbPress Contributors (latest version: 2.6.8)
Boxzilla: version: 3.2.25, author: ibericode
Disable Gutenberg Autosave: version: 1.0.10, author: websevendev
Facebook for WooCommerce: version: 2.6.7, author: Facebook
GD bbPress Attachments: version: 4.3, author: Milan Petrovic
GDPR Cookie Consent: version: 2.3.7, author: WebToffee
Heartbeat Control by WP Rocket: version: 2.0, author: WP Rocket
LearnDash LMS: version: 3.5.1.2, author: LearnDash (latest version: 3.6.0)
LearnDash LMS - bbPress Integration: version: 2.2.1, author: LearnDash
LearnDash LMS - WooCommerce Integration: version: 1.9.3.3, author: LearnDash
MC4WP: Mailchimp for WordPress: version: 4.8.6, author: ibericode
MC4WP: Mailchimp for WordPress Premium: version: 4.8.19, author: ibericode
PixelYourSite: version: 8.2.8, author: PixelYourSite (latest version: 8.2.13)
PixelYourSite Pinterest: version: 3.2.2, author: PixelYourSite (latest version: 3.2.3)
Pods - Custom Content Types and Fields: version: 2.8.5, author: Pods Framework Team
PW Advanced Woo Reporting: version: 4.9, author: Proword
RedSys Gateway for WooCommerce Pro: version: 3.3.9, author: codection
Shortcake (Shortcode UI): version: 0.7.4, author: Fusion Engineering and community
Shortcake (Shortcode UI) Richtext: version: 1.3, author: XWP
Soil: version: 3.8.1, author: Roots
Supermundano ACF Blocks: version: 1.0.0, author: Supermundano
Tawk.to Live Chat: version: 0.5.5, author: Tawkto (latest version: 0.6.0)
WooCommerce: version: 5.8.0, author: Automattic (latest version: 5.9.0)
WooCommerce Gift Certificates Pro: version: 3.6.4, author: IgniteWoo.com
WooCommerce PayPal Checkout Gateway: version: 2.1.3, author: WooCommerce
WooCommerce PDF Invoices & Packing Slips: version: 2.10.1, author: Ewout Fernhout (latest version: 2.10.4)
WooCommerce PDF Invoices & Packing Slips Premium Templates: version: 2.7.1, author: Ewout Fernhout
WooCommerce PDF Invoices & Packing Slips Professional: version: 2.2.9, author: Ewout Fernhout
WooCommerce Smart Coupons: version: 4.8.0, author: StoreApps
WooCommerce Sponsor a Friend Plugin: version: 2.3.3, author: MB Création
WooCommerce Stripe Gateway: version: 5.7.0, author: WooCommerce (latest version: 5.8.0)
WooCommerce Waitlist: version: 1.8.8, author: WooCommerce
Woocommere Build Your Pack: version: 1.0.0, author: supermundano
Yoast SEO: version: 17.5, author: Team Yoast (latest version: 17.6)

### wp-plugins-inactive (12) ###

Autoptimize: version: 2.9.2, author: Frank Goossens (futtta)
Enable jQuery Migrate Helper: version: 1.3.0, author: The WordPress Team
Supermundano Custom Roles: version: 1.0, author: Supermundano
User Switching: version: 1.5.8, author: John Blackbourn & contributors
WooCommerce Google Analytics Integration: version: 1.5.3, author: WooCommerce (latest version: 1.5.4)
WooCommerce Servired/RedSys Spain Gateway: version: 16.0.1, author: José Conti
WooCommerce Waitlist: version: 1.8.8, author: WooCommerce
WP Crontrol: version: 1.11.0, author: John Blackbourn & crontributors (latest version: 1.12.0)
WP Mail SMTP: version: 3.1.0, author: WPForms (latest version: 3.2.1)
WP Maintenance Mode: version: 2.4.1, author: Designmodo
WP Migrate DB: version: 2.2.0, author: Delicious Brains (latest version: 2.2.1)
WP Super Cache: version: 1.7.4, author: Automattic

### wp-media ###

image_editor: WP_Image_Editor_GD
imagick_module_version: No disponible
imagemagick_version: No disponible
imagick_version: No disponible
file_uploads: File uploads is turned off
post_max_size: 128M
upload_max_filesize: 128M
max_effective_size: 128 MB
max_file_uploads: 20
gd_version: 2.3.2
gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM
ghostscript_version: not available

### wp-server ###

server_architecture: Darwin 19.6.0 x86_64
httpd_software: nginx/1.17.10
php_version: 7.4.16 64bit
php_sapi: fpm-fcgi
max_input_variables: 1000
time_limit: 300
memory_limit: 2G
max_input_time: 60
upload_max_filesize: 128M
php_post_max_size: 128M
curl_version: 7.79.1 (SecureTransport) OpenSSL/1.1.1l
suhosin: false
imagick_availability: false
pretty_permalinks: true

### wp-database ###

extension: mysqli
server_version: 10.4.12-MariaDB
client_version: mysqlnd 7.4.16

### wp-constants ###

WP_HOME: http://domain.test
WP_SITEURL: http://domain.test/wp
WP_CONTENT_DIR: /Users/carlos/Sites/domain.com/web/app
WP_PLUGIN_DIR: /Users/carlos/Sites/domain.com/web/app/plugins
WP_MEMORY_LIMIT: 256M
WP_MAX_MEMORY_LIMIT: 2G
WP_DEBUG: true
WP_DEBUG_DISPLAY: true
WP_DEBUG_LOG: true
SCRIPT_DEBUG: true
WP_CACHE: false
CONCATENATE_SCRIPTS: false
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_LOCAL_DEV: undefined
DB_CHARSET: utf8mb4
DB_COLLATE: undefined

### wp-filesystem ###

wordpress: writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable
mu-plugins: writable

### pods ###

pods-server-software: nginx/1.17.10
pods-user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:94.0) Gecko/20100101 Firefox/94.0
pods-session-save-path: undefined
pods-session-save-path-exists: No
pods-session-save-path-writable: No
pods-session-max-lifetime: 1440
pods-opcode-cache-apc: No
pods-opcode-cache-memcached: No
pods-opcode-cache-opcache: Yes
pods-opcode-cache-redis: No
pods-object-cache-apc: No
pods-object-cache-apcu: Yes
pods-object-cache-memcache: No
pods-object-cache-memcached: No
pods-object-cache-redis: No
pods-memory-current-usage: 49,927M
pods-memory-current-usage-real: 18,000M
pods-network-wide: No
pods-install-location: /Users/carlos/Sites/domain.com/web/app/plugins/pods/
pods-developer: No
pods-tableless-mode: No
pods-relationship-table-enabled: Yes
pods-light-mode: No
pods-strict: No
pods-allow-deprecated: Yes
pods-api-cache: Yes
pods-shortcode-allow-evaluate-tags: No
pods-sessions: Disable sessions
pods-can-use-sessions: No

`

Pods Package

{"meta":{"version":"2.7.31","build":1637672755},"pods":{"90":{"id":90,"name":"product","label":"Product","description":"","type":"post_type","storage":"meta","object":"product","alias":"","fields":{"teacher":{"id":91,"name":"teacher","label":"Profesor","description":"","help":"","class":"","type":"pick","weight":0,"pick_object":"post_type","pick_val":"sm_equipo","sister_id":"","required":"0","pick_format_type":"single","pick_format_single":"dropdown","pick_format_multi":"checkbox","pick_taggable":"0","pick_limit":"0","pick_allow_html":"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","oembed_enabled_providers_collegehumorcom":"0","oembed_enabled_providers_facebookcom":"0","oembed_enabled_providers_funnyordiecom":"0","oembed_enabled_providers_hulucom":"0","oembed_enabled_providers_instagramcom":"0","oembed_enabled_providers_photobucketcom":"0","oembed_enabled_providers_polldaddycom":"0","pick_allow_add_new":"1","pick_show_icon":"1","pick_show_edit_link":"1","pick_show_view_link":"1","pick_display_format_multi":"default","pick_display_format_separator":", ","pick_select_text":"","pick_table_id":"","pick_table_index":"","pick_display":"","pick_where":"","pick_orderby":"","pick_groupby":""},"init_date":{"id":92,"name":"init_date","label":"Fecha de inicio","description":"","help":"","class":"","type":"date","weight":1,"pick_object":"","pick_val":"","sister_id":"","required":"0","date_format":"mdy","date_allow_empty":"1","date_html5":"0","pick_allow_html":"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","date_repeatable":"0","date_type":"format","date_format_custom":"","date_format_custom_js":"","date_year_range_custom":""},"course_type":{"id":95,"name":"course_type","label":"Tipo curso","description":"","help":"","class":"","type":"pick","weight":2,"pick_object":"custom-simple","pick_val":"","sister_id":"","pick_custom":"capsula|Cápsula\nediciones|Por ediciones","required":"0","pick_format_type":"single","pick_format_single":"dropdown","pick_format_multi":"checkbox","pick_taggable":"0","pick_limit":"0","pick_allow_html":"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_allow_add_new":"1","pick_show_icon":"1","pick_show_edit_link":"1","pick_show_view_link":"1","pick_display_format_multi":"default","pick_display_format_separator":", ","pick_select_text":"","pick_table_id":"","pick_table_index":"","pick_display":"","pick_where":"","pick_orderby":"","pick_groupby":""},"list_image":{"id":96,"name":"list_image","label":"Imagen listado","description":"","help":"","class":"","type":"file","weight":3,"pick_object":"custom-simple","pick_val":"","sister_id":"","required":"0","file_format_type":"single","file_uploader":"attachment","file_attachment_tab":"upload","file_edit_title":"1","file_linked":"0","file_limit":"0","file_restrict_filesize":"10MB","file_type":"images","file_add_button":"Añadir archivo","file_modal_title":"Incluír un archivo","file_modal_add_button":"Añadir archivo","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_allow_html":"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","file_show_edit_link":"0","file_field_template":"rows","file_upload_dir":"wp","file_upload_dir_custom":"","file_allowed_extensions":""},"duracion":{"id":122465,"name":"duracion","label":"Duración","description":"Duración del curso si es curso por ediciones","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":"255","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":""},"video":{"id":122466,"name":"video","label":"Video","description":"Video del curso. Aparecerá en lugar de la imagen destacada si existe en la ficha de producto","help":"","class":"","type":"website","weight":5,"pick_object":"","pick_val":"","sister_id":"","required":"0","website_format":"normal","website_clickable":"0","website_new_window":"0","website_max_length":"255","website_html5":"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","website_repeatable":"0","website_allow_port":"0","website_placeholder":""},"contenido":{"id":122473,"name":"contenido","label":"Contenido","description":"Contenido del curso. Se mostrará a continuación de la descripción","help":"","class":"","type":"wysiwyg","weight":6,"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","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":""},"review":{"id":122467,"name":"review","label":"Review","description":"Review asociada al curso que aparece en el sidebar","help":"","class":"","type":"pick","weight":7,"pick_object":"post_type","pick_val":"sm_review","sister_id":"","required":"0","pick_format_type":"single","pick_format_single":"dropdown","pick_format_multi":"checkbox","pick_taggable":"0","pick_limit":"0","pick_allow_html":"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_allow_add_new":"1","pick_show_icon":"1","pick_show_edit_link":"1","pick_show_view_link":"1","pick_display_format_multi":"default","pick_display_format_separator":", ","pick_select_text":"","pick_table_id":"","pick_table_index":"","pick_display":"","pick_where":"","pick_orderby":"","pick_groupby":""},"related_info":{"id":122469,"name":"related_info","label":"Info relacionada","description":"Información relacionada que aparecerá en el sidebar del curso","help":"","class":"","type":"wysiwyg","weight":8,"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","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":""},"regalo":{"id":122475,"name":"regalo","label":"regalo","description":"Productos regalo relacionados con el producto actual","help":"","class":"","type":"pick","weight":9,"pick_object":"post_type","pick_val":"product","sister_id":"","required":"0","pick_format_type":"multi","pick_format_single":"dropdown","pick_format_multi":"multiselect","pick_taggable":"0","pick_limit":"0","pick_allow_html":"0","pick_user_role":[],"pick_post_status":["publish","future","draft"],"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_allow_add_new":"1","pick_show_icon":"1","pick_show_edit_link":"1","pick_show_view_link":"1","pick_display_format_multi":"default","pick_display_format_separator":", ","pick_select_text":"","pick_table_id":"","pick_table_index":"","pick_display":"","pick_where":"","pick_orderby":"","pick_groupby":""},"simple_title":{"id":122476,"name":"simple_title","label":"Título simple","description":"Título utilizado en productos regalo para mostrarlos en el popup de productos regalo de productos principales","help":"","class":"","type":"text","weight":10,"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","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":""}},"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","rest_base":"product","read_all":"0","write_all":"0","built_in_taxonomies_sm_banner_location":"0","_migrated_28":"1"}}}
sc0ttkclark commented 2 years ago

This is most likely related to the extended post type / taxonomy issue we're working on.

JoryHogeveen commented 2 years ago

@sc0ttkclark Fixed in 2.8.6?

sc0ttkclark commented 2 years ago

I'm going to leave this open and have them retest in 2.8.6, I can't seem to reproduce the issue itself.

JessieBee3 commented 2 years ago

I have the same problem. I haven't been able to update since 2.8.4 Interesting that it looks like this site is in Spanish....mine is also in Spanish. My other websites (in English) have not had this problem.

JoryHogeveen commented 2 years ago

Hi @JessieBee3 and @cfaria

Do you happen to use pods_group_add() in the code instead of Pods core fields UI? We have several users reporting similar issues when they created custom groups pre 2.8.

JessieBee3 commented 2 years ago

Yes. I do use that.

cfaria commented 2 years ago

No, I don't

JoryHogeveen commented 2 years ago

@JessieBee3 Please see #6381

@cfaria Same thing happens on the latest version? Even after clearing cache?

sc0ttkclark commented 2 years ago

I can't reproduce this issue in 2.8.9, it may have been related to other things we fixed since 2.8.6.

cfaria commented 2 years ago

This is still happening with current version 2.8.8.1. @sc0ttkclark I can share an anonymized database for you to check this out. The database is pretty huge but I think I can fix that...

sc0ttkclark commented 2 years ago

@cfaria hit me up on the Pods slack if you want to move forward with that, thanks