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

Compatibility with WPML: Changes to custom field data not saving in secondary language. #7301

Open
c-davidson opened this issue May 8, 2024 · 0 comments

Comments

@c-davidson
Copy link

Description

I'm using Pods to create job postings on a bilingual site that uses WPML. Each job posting has 2 fields (Job # and Close date), and each post has an English and French version. English is the default language and French is the secondary. After the update to Pods 2.8 and all versions after, any changes to the custom fields (eg, a new Close date) are not being saved on the French posts only. The issue happens with both date fields and text fields.

The last version of Pods that didn't have this issue was 2.7.31.

This is a follow-up to issue #7079 where on a different version of the same website the More Fields box was missing completely on the French posts. On my current version, the box is there, but any changes to the data aren't saved when I click the Update button for the post.

I see some other reports of possibly similar issues with WPML, eg, #7217, #6571, #6301

Note: In the Site Health info panel I'm seeing this warning:
Warning: Undefined array key "data" in /home/customer/www/comnet.conniedavidson.ca/public_html/wp-content/plugins/pods/classes/PodsAdmin.php on line 4771

Version

3.2.1.1

Testing Instructions

  1. Create site with WPML installed and use Pods to create post type with a custom field.
  2. Create new custom post, setting the custom field data to an intial setting.
  3. Publish post in both languages.
  4. Open post editor for non-default language.
  5. Change data in custom field.
  6. Update post.
  7. Check custom field in editor to see if change was saved.

Screenshots / Screencast

Secondary language job post with initial Close Date of 31 Dec. 2023:

Secondary language post-custom field initial Close Date

Changing Close date to 31 Jan. 2024:

Secondary language post-changing Close Date

After clicking Update button - still set to 31 Dec. 2023:

Secondary language post-after update-Close Date not saved

Possible Workaround

Roll back to Pods 2.7.31

Site Health Information

`
### wp-core ###

version: 6.5.3
site_language: en_US
user_language: en_US
timezone: America/Toronto
permalink: /%postname%/
https_status: true
multisite: false
user_registration: 0
blog_public: 0
default_comment_status: closed
environment_type: production
user_count: 4
dotorg_communication: true

### wp-paths-sizes ###

wordpress_path: /home/customer/www/comnet.conniedavidson.ca/public_html
wordpress_size: 604.12 MB (633469172 bytes)
uploads_path: /home/customer/www/comnet.conniedavidson.ca/public_html/wp-content/uploads
uploads_size: 34.08 MB (35737474 bytes)
themes_path: /home/customer/www/comnet.conniedavidson.ca/public_html/wp-content/themes
themes_size: 21.16 MB (22191500 bytes)
plugins_path: /home/customer/www/comnet.conniedavidson.ca/public_html/wp-content/plugins
plugins_size: 217.20 MB (227748355 bytes)
database_size: 65.34 MB (68517888 bytes)
total_size: 941.91 MB (987664389 bytes)

### wp-active-theme ###

name: Total (Total)
version: 5.14
author: WPExplorer
author_website: https://www.wpexplorer.com/
parent_theme: none
theme_features: core-block-patterns, widgets-block-editor, block-templates, editor-style, automatic-feed-links, post-thumbnails, title-tag, customize-selective-refresh-widgets, align-wide, responsive-embeds, post-formats, html5, menus, widgets
theme_path: /home/customer/www/comnet.conniedavidson.ca/public_html/wp-content/themes/Total
auto_update: Disabled

### wp-themes-inactive (2) ###

Twenty Twenty-Four: version: 1.1, author: the WordPress team, Auto-updates disabled
Twenty Twenty-Three: version: 1.4, author: the WordPress team, Auto-updates disabled

### wp-plugins-active (8) ###

Pods - Custom Content Types and Fields: version: 3.2.1.1, author: Pods Framework Team, Auto-updates disabled
Posts Table Pro: version: 3.1.4, author: Barn2 Plugins, Auto-updates disabled
Speed Optimizer: version: 7.5.0, author: SiteGround, Auto-updates disabled
Total Theme Core: version: 1.8.4, author: WPExplorer, Auto-updates disabled
Wordfence Security: version: 7.11.5, author: Wordfence, Auto-updates disabled
WPBakery Page Builder: version: 7.6, author: Michael M - WPBakery.com, Auto-updates disabled
WPML Multilingual CMS: version: 4.6.10, author: OnTheGoSystems, Auto-updates disabled
WPML String Translation: version: 3.2.11, author: OnTheGoSystems, Auto-updates disabled

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

Classic Widgets: version: 0.3, author: WordPress Contributors, Auto-updates disabled
iubenda | All-in-one Compliance for GDPR / CCPA Cookie Consent + more: version: 3.10.4, author: iubenda, Auto-updates disabled
LayerSlider: version: 7.9.5, author: Kreatura Media, Auto-updates disabled
PublishPress Future: version: 3.3.1, author: PublishPress, Auto-updates disabled
Redirection: version: 5.4.2, author: John Godley, Auto-updates disabled
Security Optimizer: version: 1.4.13, author: SiteGround, Auto-updates disabled
Templatera: version: 2.1.0, author: WPBakery, Auto-updates disabled
UberMenu 3 - The Ultimate WordPress Mega Menu: version: 3.8.1, author: Chris Mavricos, SevenSpark, Auto-updates disabled
UpdraftPlus - Backup/Restore: version: 2.23.12.26, author: UpdraftPlus.Com, DavidAnderson, Auto-updates disabled
WP Accessibility: version: 2.1.8, author: Joe Dolson, Auto-updates disabled
WPML Media Translation: version: 2.7.4, author: OnTheGoSystems, Auto-updates disabled
Yoast SEO: version: 22.6, author: Team Yoast, Auto-updates disabled

### wp-media ###

image_editor: WP_Image_Editor_GD
imagick_module_version: Not available
imagemagick_version: Not available
imagick_version: Not available
file_uploads: 1
post_max_size: 256M
upload_max_filesize: 256M
max_effective_size: 256 MB
max_file_uploads: 20
gd_version: 2.3.3
gd_formats: GIF, JPEG, PNG, WebP, BMP, AVIF, XPM
ghostscript_version: 10.02.1

### wp-server ###

server_architecture: Linux 6.6.21-MCIclouder470 x86_64
httpd_software: Apache
php_version: 8.2.18 64bit
php_sapi: cgi-fcgi
max_input_variables: 3000
time_limit: 120
memory_limit: 768M
max_input_time: 120
upload_max_filesize: 256M
php_post_max_size: 256M
curl_version: 8.2.1 OpenSSL/3.1.1
suhosin: false
imagick_availability: false
pretty_permalinks: true
htaccess_extra_rules: true
current: 2024-05-08T19:53:03+00:00
utc-time: Wednesday, 08-May-24 19:53:03 UTC
server-time: 2024-05-08T15:53:02-04:00

### wp-database ###

extension: mysqli
server_version: 8.0.34-26
client_version: mysqlnd 8.2.18
max_allowed_packet: 33554432
max_connections: 500

### wp-constants ###

WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: /home/customer/www/comnet.conniedavidson.ca/public_html/wp-content
WP_PLUGIN_DIR: /home/customer/www/comnet.conniedavidson.ca/public_html/wp-content/plugins
WP_MEMORY_LIMIT: 256M
WP_MAX_MEMORY_LIMIT: 768M
WP_DEBUG: false
WP_DEBUG_DISPLAY: true
WP_DEBUG_LOG: false
SCRIPT_DEBUG: false
WP_CACHE: false
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_ENVIRONMENT_TYPE: Undefined
WP_DEVELOPMENT_MODE: undefined
DB_CHARSET: utf8
DB_COLLATE: undefined

### wp-filesystem ###

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

### pods ###

pods-version: 3.2.1.1
pods-first-version: 2.7.31
pods-last-version: 3.0.8
pods-server-software: Apache
pods-user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
pods-session-save-path: /tmp
pods-session-save-path-exists: Yes
pods-session-save-path-writable: Yes
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: No
pods-object-cache-memcache: No
pods-object-cache-memcached: Yes
pods-object-cache-redis: No
pods-memory-current-usage: 108.127M / 256M
pods-memory-current-usage-real: 110.695M
pods-network-wide: No
pods-install-location: /wp-content/plugins/pods/
pods-developer: No
pods-tableless-mode: No
pods-relationship-table-enabled: Yes
pods-relationship-table-status: 0
pods-light-mode: No
pods-strict: No
pods-allow-deprecated: Yes
pods-api-cache: Yes
pods-shortcode-allow-evaluate-tags: No
pods-can-use-sessions: Yes
pods-settings-types_only: Enable [types_only=0]
pods-settings-watch_changed_fields: Enable [watch_changed_fields=1]
pods-settings-metadata_integration: Enable [metadata_integration=1]
pods-settings-metadata_override_get: Enable [metadata_override_get=1]
pods-settings-register_meta_integration: Disable [register_meta_integration=0]
pods-settings-media_modal_fields: Disable [media_modal_fields=1]
pods-settings-session_auto_start: Disable [session_auto_start=0]
pods-settings-dynamic_features_allow: Enable [dynamic_features_allow=1]
pods-settings-dynamic_features_enabled: Display and Form [dynamic_features_enabled=display,form]
pods-settings-show_access_restricted_messages: Disable [show_access_restricted_messages=0]
pods-settings-show_access_admin_notices: Enable [show_access_admin_notices=1]
pods-settings-dynamic_features_allow_sql_clauses: Restricted [dynamic_features_allow_sql_clauses=simple]
pods-settings-display_callbacks: Restricted [display_callbacks=restricted]
pods-settings-display_callbacks_allowed: esc_attr,esc_html

`

Pods Package

{
    "@meta": {
        "version": "3.2.1.1",
        "build": 1715198466
    },
    "settings": {
        "types_only": "0",
        "watch_changed_fields": "1",
        "metadata_integration": "1",
        "metadata_override_get": "1",
        "register_meta_integration": "0",
        "media_modal_fields": "1",
        "session_auto_start": "0",
        "dynamic_features_allow": "1",
        "dynamic_features_enabled": [
            "display",
            "form"
        ],
        "show_access_restricted_messages": "0",
        "show_access_admin_notices": "1",
        "dynamic_features_allow_sql_clauses": "simple",
        "display_callbacks": "restricted",
        "display_callbacks_allowed": "esc_attr,esc_html",
        "wisdom_opt_out": "1",
        "active_components": [
            "migrate-packages",
            "templates",
            "translate-pods-admin"
        ]
    },
    "pods": [
        {
            "name": "job",
            "id": 1373,
            "label": "Jobs",
            "description": "",
            "label_singular": "Job",
            "public": "1",
            "show_ui": "1",
            "supports_title": "1",
            "supports_editor": "1",
            "type": "post_type",
            "storage": "meta",
            "publicly_queryable": "1",
            "exclude_from_search": "0",
            "capability_type": "post",
            "capability_type_custom": "job",
            "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_link_category": "0",
            "built_in_taxonomies_portfolio_category": "0",
            "built_in_taxonomies_portfolio_tag": "0",
            "built_in_taxonomies_post_series": "0",
            "built_in_taxonomies_post_tag": "0",
            "built_in_taxonomies_staff_category": "0",
            "built_in_taxonomies_staff_tag": "0",
            "built_in_taxonomies_testimonials_category": "0",
            "built_in_taxonomies_translation_priority": "0",
            "show_in_menu": "1",
            "menu_position": "0",
            "show_in_nav_menus": "1",
            "show_in_admin_bar": "1",
            "pfat_enable": "0",
            "pfat_append_single": "append",
            "pfat_filter_single": "the_content",
            "pfat_append_archive": "append",
            "pfat_filter_archive": "the_excerpt",
            "pfat_run_outside_loop": "0",
            "rest_enable": "0",
            "read_all": "0",
            "write_all": "0",
            "built_in_taxonomies_region": "1",
            "label_fr_FR": "Emplois",
            "label_singular_fr_FR": "Emplois",
            "enable_i18n": {
                "fr_FR": "1"
            },
            "_wpml_location_migration_done": "1",
            "_migrated_28": "1",
            "_wpml_word_count": "{\"total\":2,\"to_translate\":{\"fr\":2}}",
            "label_i18n": "Jobs",
            "label_i18n_default": "Jobs",
            "label_singular_i18n": "Job",
            "label_singular_i18n_default": "Job",
            "groups": [
                {
                    "name": "more_fields",
                    "id": 1881,
                    "label": "More Fields",
                    "description": "",
                    "weight": 0,
                    "fields": [
                        {
                            "name": "job_num",
                            "id": 1374,
                            "label": "Job #",
                            "description": "",
                            "weight": 0,
                            "type": "text",
                            "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",
                            "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": "1",
                            "unique": "0",
                            "text_repeatable": "0",
                            "repeatable": "0",
                            "repeatable_format": "default",
                            "default_evaluate_tags": "0",
                            "default_empty_fields": "0",
                            "revisions_revision_field": "0",
                            "enable_conditional_logic": "0",
                            "label_fr_FR": "No. d\u2019emploi",
                            "logged_in_only": "0"
                        },
                        {
                            "name": "close_date",
                            "id": 1375,
                            "label": "Close date",
                            "description": "",
                            "weight": 1,
                            "type": "date",
                            "required": "0",
                            "date_type": "custom",
                            "date_format": "mdy",
                            "date_allow_empty": "1",
                            "date_html5": "0",
                            "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": "1",
                            "unique": "0",
                            "date_repeatable": "0",
                            "date_format_custom": "j F Y",
                            "repeatable": "0",
                            "repeatable_format": "default",
                            "default_evaluate_tags": "0",
                            "default_empty_fields": "0",
                            "revisions_revision_field": "0",
                            "enable_conditional_logic": "0",
                            "label_fr_FR": "Date limite"
                        }
                    ]
                }
            ]
        }
    ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant