PHP warning when importing an ACF Message field within Flexible Content
J
Jeven Seider
Dear WP All Import Support Team,
We encountered an “Undefined array key” warning when importing an ACF Flexible Content layout containing a Message field.
The warning occurs in
wpai-acf-add-on/src/fields/acf/FieldFlexibleContent.php
on line 60. With the field key anonymized, it reads:PHP Warning: Undefined array key "field_example_message"
ACF Message fields only display information in the backend and do not provide a value to import. Although the field factory recognizes these fields as
FieldEmpty
, the Flexible Content parser still accesses their missing import mapping:$layout_fields[$sub_field['key']]
We tested with multilingual functionality disabled and confirmed the following:
- With the Message field present, the warning occurs during import.
- After removing the Message field, the import runs without this warning.
We reproduced the issue using WP All Import Pro version 5.0.3.
Both the Free and Pro versions of the WP All Import ACF Add-On were installed and active during testing: Free version 1.0.8 and Pro version 4.0.1.
Could you please confirm whether this is a known issue and whether a fix is available or planned?
Kind regards