Support

Account

Home Forums Backend Issues (wp-admin) Custom fields get emptied when publishing Reply To: Custom fields get emptied when publishing

  • @pers & @mathias Gomig – after a considerable amount of searching, I finally figured out that this problem is being caused by the ‘load_field_defaults’ function in ACF’s core/fields/_base.php. The value is being saved and even being loaded without issue, but this function overwrites the value of the field with the default value. I’m not entirely sure why this is happening, but it’s definitely the culprit.

    To resolve the situation, simply override this function like so:

    function load_field_defaults( $field ) { return $field; }

    The field values are now displaying correctly for me on ACF 4.2.0.