Hello,
Thanks for the feedback! Yes this issue has been reported with the latest ACF Pro patch and will be fixed in the upcoming ACF Extended update.
With the latest ACF Pro 5.9.6 version, ACF now takes the Sub Options Page Position
setting into account when registering the Admin Submenu.
Enhancement – Added ‘position’ setting compatibility for Options Page submenus.
If you’re using the ACF Extended Options Page UI module and create a Sub Options Page, you’ll get a PHP Notice because the position
is not a int
.
This notice will be fixed in the next patch, which should come somewhere next week. Note that this notice will not break your website (it’s a notice, not an error).
In the meantime, if you want to get rid of it, you can add the following code in your functions.php
file:
// ACF Extended 0.8.8.3: Fix ACF Sub Options Pages position PHP notice
add_filter('acfe/options_page/register', 'my_acfe_sub_options_pages_fix_position_notice', 10, 2);
function my_acfe_sub_options_pages_fix_position_notice($args, $name){
// force int position
$args['position'] = (int) $args['position'];
// return
return $args;
}
Generally speaking, I also recommend to turn off WP_DEBUG_DISPLAY
and enable the WP_DEBUG_LOG
in the wp-config.php
file, to only show errors/notices in the /wp-content/debug.log
file and avoid breaking page headers. Usage example:
define('WP_DEBUG', true); // Enable debug
define('WP_DEBUG_LOG', true); // Log them in /wp-content/debug.log file
define('WP_DEBUG_DISPLAY', false); // Do not display them on screen
I’ll let you know as soon as the patch is up so you can remove the code from the functions.php
file. The code will not break the update, so you don’t have to worry about that.
Sorry for the inconvenience.
Have a nice day!
Regards.