WPML

Overview of the Issue

When using Advanced Custom Fields with ACFML, you might experience a fatal error when saving nested fields on ACF options pages in a secondary language.

Fatal error: Uncaught TypeError: md5(): Argument

#1 ($string) must be of type string, array given in .../wp-content/plugins/acfml/classes/Strings/Package.php:174

Workaround

This issue is fixed in Advanced Custom Fields Multilingual 2.2.3. Updating solves it on your site, so you only need this workaround if you can’t update yet.

Please, make sure of having a full site backup of your site before proceeding.

  • Open the …/wp-content/plugins/acfml/classes/Options/EditorHooks.php file.
  • Look the registerFieldTranslation function around line 308.
  • Replace:
    if ( null === $originalValue || false === $originalValue ) {
    	return;
    }
  • With:
    if ( null === $originalValue || false === $originalValue || ! is_scalar( $originalValue ) ) {
    	return;
    }

Still Seeing This Issue?

If updating doesn’t fix it, ask a support question and we’ll look into it with you.

Ask a support question

All known issues