Support

Account

Home Forums Feature Requests Local fields defined by PHP : better debug

Solving

Local fields defined by PHP : better debug

  • I wish ACF provided error messages for local fields. It would help debugging faulty fields much easier.

    For instance, if you accidentally define two fields with the same unique field key, the first issue you run into is “PHP reached max execution time” or “PHP reached max memory allocation”. I wish ACF would directly throw and error and tell me “Field XYZ tried to use unique field key ABC, but it was already taken by field DEF”.

  • You can use ‘get_field_object($field_key)` to see if a field is already defined. However, as I mentioned in your other topic, this will not work if a field has not already been defined in some other php code and will be defined later.

  • That’s pretty hard to use when you’re defining whole field groups in a single array though.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Local fields defined by PHP : better debug’ is closed to new replies.