Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
If you're experiencing an error with ACFML when saving or viewing a post in the WordPress admin, where

$fieldParent

can sometimes be null, leading to a PHP warning on line 249 of class-wpml-acf-repeater-shuffle.php, this summary is for you.
Solution:
We recommend trying the workaround provided in the following documentation: ACFML PHP Warning: Attempt to read property 'post_content' on null. Please ensure to back up your database before making any changes.

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Should you need further assistance, please do not hesitate to open a new support ticket at WPML support forum.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Andrey 5 months ago.

Assisted by: Andrey.

Author Posts
June 19, 2024 at 8:35 pm #15758507

andyZ-4

Background of the issue:
I am trying to: There's an error with ACFML when saving a post or viewing a post in the WordPress admin. It looks like $fieldParent can sometimes be null in this statement

$fieldParentContent = maybe_unserialize( $fieldParent->post_content );

on line 249 of class-wpml-acf-repeater-shuffle.php.

Symptoms:
class-wpml-acf-repeater-shuffle.php: Attempt to read property "post_content" on null. Full stacktrace: in WPML_ACF_Repeater_Shuffle::isChildOfRepeaterField called at /wp-content/plugins/acfml/classes/class-wpml-acf-repeater-shuffle.php (249) in WPML_ACF_Repeater_Shuffle::revertFieldValuesForSignature called at /wp-includes/class-wp-hook.php (324) in WP_Hook::apply_filters called at /wp-includes/plugin.php (205) in apply_filters called at /wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php (147) in WPML_TM_Action_Helper::get_post_custom_fields called at /wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php (46) in WPML_TM_Action_Helper::post_md5 called at /wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-post-actions.class.php (142) in WPML_TM_Post_Actions::{closure} called at ? (?) in call_user_func called at /wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Shared/AutoUpdate/Hooks.php (107) in WPMLPBAutoUpdateHooks::afterRegisterAllStringsInShutdown called at /wp-includes/class-wp-hook.php (324) in WP_Hook::apply_filters called at /wp-includes/class-wp-hook.php (348) in WP_Hook::do_action called at /wp-includes/plugin.php (517) in do_action called at /wp-includes/load.php (1270) in shutdown_action_hook called at ? (?)

Questions:
How can I resolve the error with ACFML when saving or viewing a post in the WordPress admin?
Why is $fieldParent sometimes null in the statement $fieldParentContent = maybe_unserialize( $fieldParent->post_content ); on line 249 of class-wpml-acf-repeater-shuffle.php?

June 19, 2024 at 9:10 pm #15758746

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

Thank you for contacting WPML support.

Could you please test the workaround using the following link?

https://wpml.org/errata/acfml-php-warning-attempt-to-read-property-post_content-on-null/

Before proceeding with any changes, please make sure to back up your database first.