Support

Account

Home Forums ACF PRO TextArea – No Formatting not saving for New Lines Reply To: TextArea – No Formatting not saving for New Lines

  • Hello ralphioooo and John,

    I have encountered the same problem on one of my websites where I updated the plugin to version 5.5.0. It is indeed a (severe) bug since saving a field set where a textarea is used resets to the “Automatically add paragraphs” option and it can completely mess up the frontend display or worst when used for e.g. adding JavaScript or CSS to the head of a website which I do on some occasions. Furthermore it may also affect other select type choices in other fields.

    Since with the database upgrade rolling back was not an option for me I dived into the code to put in a quick fix myself. I tracked the problem down to the following file after comparing the code to a previous version that did not have this problem:

    /advanced-custom-fields-pro/fields/select.php

    Around line 269 there used to be an additional couple of lines of code which, when adding them again to the file, solved the problem and the select now has the proper choice active in the WP admin edit screen:

    // add empty value (allows ” to be selected)
    if( !count($field[‘value’]) ) {
    $field[‘value’][”] = ”;
    }

    I’m not sure if the above piece of code was moved to a different location or rewritten/ replaced by a different piece of code that is apparently currently not working. It makes sense that it should be present because with the code missing it is no longer allowed to have an empty value a valid option.

    I hope that a fix will be released soon by you guys so the problem is resolved.

    Kind regards,
    Ernst Jansen
    ByteMotion