Looks like since upgrading to 5.7.11 I’m getting an issue if I have the Simple History plugin active.
I’ve also seen this issue recently logged on simple history here 11 hours ago:
Specifically the steps to replicate for me are to update a date/time field on a page and try and publish. This results in a 500 error but the page actually saves the changes.
The logs show this error:
AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to undefined function _acf_get_field_by_id() in /httpdocs/wp-content/plugins/simple-history/loggers/Plugin_ACF.php:374\nStack trace:\n#0 /httpdocs/wp-content/plugins/simple-history/loggers/Plugin_ACF.php(271): Plugin_ACF->add_acf_context(Array, 'changed', Array, Array, Array, Array)\n#1 /httpdocs/wp-includes/class-wp-hook.php(286): Plugin_ACF->on_acf_save_post(174)\n#2 /httpdocs/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)\n#3 /httpdocs/wp-includes/plugin.php(453): WP_Hook->do_action(Array)\n#4 /httpdocs/wp-content/plugins/advanced-custom-fields-pro/includes/acf-form-functions.php(136): do_action('acf/save_post', 174)\n#5 /httpdocs/wp-content/plu...\n', referer: https://websiteurl.com.au/wp-admin/post.php?post=174&action=edit
I had a similar issue with another plugin. It seems there have been some changes in ACF that will require attention by the developer of the other plugin and you’ll probably want to contact them about it. Most of the changes causing this issue are do to the removal or renaming of some internal functions that other developers may have been using.
So, I did a little digging into this and it seems that in version 5.7.11/12 ACF decided to deprecate the function called “_acf_get_field_by_id”. However, in the /advanced-custom-fields-pro/includes/acf-deprecated-functions.php line 57 the function is called “_acf_get_fields_by_id” (Note “fields” in plural) and that seems to be breaking resources that are still using the deprecated _acf_get_field_by_id, due to a typo/misspelling of the function?
ACF, any input on this?
For a fix with the coexistence with Simple History please refer to https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-_acf_get_field_by_id/#post-11222978.
However, I still don’t understand why ACF changed the function name when deprecating it.
The topic ‘ACF Pro 5.7.11 + Simple History 2.29.1 not working together’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!