• Resolved dwpro

    (@dwpro)


    WP v6.5.5.
    PHP 8.0.30/8.2.20

    After update to version 6.9.33 trying to open AAM backend I get following error:
    Uncaught TypeError: base64_encode():
    Argument #1 ($string) must be of type string, array given in /home/www/…/wp-content/plugins/advanced-access-manager/application/Service/Toolbar.php:262
    Stack trace:
    #0 /home/www/…/wp-content/plugins/advanced-access-manager/application/Service/Toolbar.php(262): base64_encode(Array)
    #1 /home/www/…/wp-content/plugins/advanced-access-manager/application/Service/Toolbar.php(132): AAM_Service_Toolbar->normalize_tree(Array) #2 /home/www/…/wp-includes/class-wp-hook.php(324): AAM_Service_Toolbar->cache_admin_bar('') #3 /home/www/…/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #4 /home/www/…/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #5 /home/www/…/wp-includes/admin-bar.php(111): do_action('wp_after_admin…')
    #6 /home/www/…/wp-includes/class-wp-hook.php(324): wp_admin_bar_render('')
    #7 /home/www/…/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)
    #8 /home/www/…/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #9 /home/www/…/wp-admin/admin-header.php(267): do_action('in_admin_header')
    #10 /home/www/…/wp-admin/admin.php(239): require_once('/home/www/…/w…')
    #11 {main} thrown in /home/www/…/wp-content/plugins/advanced-access-manager/application/Service/Toolbar.php on line 262

    Please fix asap – thx!
    Kind regards, Gerald

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author AAM Plugin

    (@vasyltech)

    @dwpro thank you for the message. Based on the error, it looks like either one of active plugins or theme is doing something funky with admin toolbar. Based on WordPress core standards, the ‘title’ property for the admin toolbar item has to contain a string value. In other words – title should be a readable title. In your case, looks like this is an array of values and this what violates the standards.

    We are going to make the changes on our end to take into considerations plugins and themes that do not play nice.

    In the meantime, consider disabling either WP_DEBUG mode or in your PHP configuration file – display_errors option to avoid printing warnings and notices on your production site.

    Thread Starter dwpro

    (@dwpro)

    Hello!
    Thank you for your efforts.
    After update to version 6.9.34 trying to open AAM backend I get following error:

    Uncaught TypeError: base64_encode():
    Argument #1 ($string) must be of type string, array given in /home/www/XYZ/wp-content/plugins/advanced-access-manager/application/Service/Toolbar.php:272
    Stack trace:
    #0 /home/www/XYZ/wp-content/plugins/advanced-access-manager/application/Service/Toolbar.php(272): base64_encode(Array)
    #1 /home/www/XYZ/wp-content/plugins/advanced-access-manager/application/Service/Toolbar.php(142): AAM_Service_Toolbar->_normalize_tree(Array)
    #2 /home/www/XYZ/wp-includes/class-wp-hook.php(324): AAM_Service_Toolbar->cache_admin_bar('')
    #3 /home/www/XYZ/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)
    #4 /home/www/XYZ/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #5 /home/www/XYZ/wp-includes/admin-bar.php(111): do_action('wp_after_admin_…')
    #6 /home/www/XYZ/wp-includes/class-wp-hook.php(324): wp_admin_bar_render('')
    #7 /home/www/XYZ/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)
    #8 /home/www/XYZ/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #9 /home/www/XYZ/wp-admin/admin-header.php(267): do_action('in_admin_header')
    #10 /home/www/XYZ/wp-admin/admin.php(239): require_once('/home/www/XYZ/w…')
    #11 {main} thrown in /home/www/XYZ/wp-content/plugins/advanced-access-manager/application/Service/Toolbar.php on line 272

    Please fix asap – thx!
    Kind regards, Gerald

    • This reply was modified 4 months, 2 weeks ago by dwpro.
    Thread Starter dwpro

    (@dwpro)

    Hello!
    After update to version 6.9.36 trying to open AAM backend I get following error:

    Fatal error: Uncaught TypeError: base64_encode(): Argument #1 ($string) must be of type string, array given in /home/www/sav/wp-content/plugins/advanced-access-manager/application/Service/Toolbar.php:272 Stack trace: #0 /home/www/sav/wp-content/plugins/advanced-access-manager/application/Service/Toolbar.php(272): base64_encode(Array) #1 /home/www/sav/wp-content/plugins/advanced-access-manager/application/Service/Toolbar.php(142): AAM_Service_Toolbar->_normalize_tree(Array) #2 /home/www/sav/wp-includes/class-wp-hook.php(324): AAM_Service_Toolbar->cache_admin_bar('') #3 /home/www/sav/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #4 /home/www/sav/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #5 /home/www/sav/wp-includes/admin-bar.php(111): do_action('wp_after_admin_...') #6 /home/www/sav/wp-includes/class-wp-hook.php(324): wp_admin_bar_render('') #7 /home/www/sav/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #8 /home/www/sav/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #9 /home/www/sav/wp-admin/admin-header.php(267): do_action('in_admin_header') #10 /home/www/sav/wp-admin/admin.php(239): require_once('/home/www/sav/w...') #11 {main} thrown in /home/www/sav/wp-content/plugins/advanced-access-manager/application/Service/Toolbar.php on line 272

    Please fix asap – thx!
    Kind regards, Gerald

    Thread Starter dwpro

    (@dwpro)

    Hello!
    After update to version 6.9.37 trying to open AAM backend I get following error:

    Fatal error: Uncaught TypeError: base64_encode(): Argument #1 ($string) must be of type string, array given in /home/.../wp-content/plugins/advanced-access-manager/application/Service/Toolbar.php:272 Stack trace: #0 /home/.../wp-content/plugins/advanced-access-manager/application/Service/Toolbar.php(272): base64_encode(Array) #1 /home/.../wp-content/plugins/advanced-access-manager/application/Service/Toolbar.php(142): AAM_Service_Toolbar->_normalize_tree(Array) #2 /home/.../wp-includes/class-wp-hook.php(324): AAM_Service_Toolbar->cache_admin_bar('') #3 /home/.../wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #4 /home/.../wp-includes/plugin.php(517): WP_Hook->do_action(Array) #5 /home/.../wp-includes/admin-bar.php(111): do_action('wp_after_admin_...') #6 /home/.../wp-includes/class-wp-hook.php(324): wp_admin_bar_render('') #7 /home/.../wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #8 /home/.../wp-includes/plugin.php(517): WP_Hook->do_action(Array) #9 /home/.../wp-admin/admin-header.php(267): do_action('in_admin_header') #10 /home/.../wp-admin/admin.php(239): require_once('/home/.../w...') #11 {main} thrown in /home/.../wp-content/plugins/advanced-access-manager/application/Service/Toolbar.php on line 272

    Please fix asap – thx!
    Kind regards, Gerald

    Thread Starter dwpro

    (@dwpro)

    Hello!
    After update to version 6.9.38 trying to open AAM backend I get following error:

    Fatal error: Uncaught TypeError: base64_encode(): Argument #1 ($string) must be of type string, array given in /home/www/…/wp-content/plugins/advanced-access-manager/application/Service/Toolbar.php:272 Stack trace: #0 /home/www/…/wp-content/plugins/advanced-access-manager/application/Service/Toolbar.php(272): base64_encode(Array) #1 /home/www/…/wp-content/plugins/advanced-access-manager/application/Service/Toolbar.php(142): AAM_Service_Toolbar->normalize_tree(Array) #2 /home/www/…/wp-includes/class-wp-hook.php(324): AAM_Service_Toolbar->cache_admin_bar('') #3 /home/www/…/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #4 /home/www/…/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #5 /home/www/…/wp-includes/admin-bar.php(111): do_action('wp_after_admin…') #6 /home/www/…/wp-includes/class-wp-hook.php(324): wp_admin_bar_render('') #7 /home/www/…/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #8 /home/www/…/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #9 /home/www/…/wp-admin/admin-header.php(267): do_action('in_admin_header') #10 /home/www/…/wp-admin/admin.php(239): require_once('/home/www/…/w…') #11 {main} thrown in /home/www/…/wp-content/plugins/advanced-access-manager/application/Service/Toolbar.php on line 272

    Please fix asap – thx!
    Kind regards, Gerald

    Plugin Author AAM Plugin

    (@vasyltech)

    @dwpro,

    Thank you for the report. Based on the error, I can tell that one of the plugins or theme that is active on your site is not following WordPress standards and breaks the Admin Toolbar menu.

    The problem is with one of the items that has property “title”. This property has to contain a string, instead it has an array of some values. This is not a correct way to register custom admin toolbar item.

    We are going to adjust our code to work with corrupted admin menu items, but I would suggest to deactivate each plugin on your site one-by-one to find out which one causes the troubles. This way we can reach out to plugin owners and see if they can resolve this issue on their end.

    Thread Starter dwpro

    (@dwpro)

    Hello!

    In version 6.9.41 the plugin backend works fine again now.
    Thank you!

    Kind regards,
    Gerald

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.