UPDATE: the new version 5.11.4 of ACF released today solve the problem!
The ACF assistance suggest me this solution, I have tried and it works perfectly!
Add the following lines in the functions.php file, to avoid ProfilePress loading the “select2” library and use only the ACF one to avoid conflicts.
add_action( 'wp_enqueue_scripts', 'remove_profilepress_select2', 99 );
add_action( 'admin_enqueue_scripts', 'remove_profilepress_select2', 99 );
function remove_profilepress_select2() {
wp_dequeue_style( 'ppress-select2' );
wp_dequeue_script( 'ppress-select2' );
}
The error is “No select2/compat/dropdownCss” at line 1361 of
/wp-content/plugins/wp-user-avatar/assets/select2/select2.min.js
I think there is a conflict given by duplicate names between this file and an object in
/wp-content/plugins/advanced-custom-fields-pro/assets/build/js/acf-input.min.js
or
/wp-content/plugins/advanced-custom-fields-pro/assets/build/js/acf.min.js
The same error occurs both in the ACF editor when adding a “post object” field and in the page editor where this field appears.