reduxframework / redux-framework-4

Redux v4
https://redux.io/redux-4/
Other
97 stars 32 forks source link

WP 6 PHP Notice #234

Closed andrejarh closed 2 years ago

andrejarh commented 2 years ago

I just tested WP 6 and a PHP notice appears:

Notice: Function add_menu_page was called incorrectly. The seventh parameter passed to add_menu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.)

It is reffering to args['page_priority'] in public options_page function located at /inc/classes/class-redux-page-render.php

                $this->page = call_user_func(
                    'add_menu_page',
                    $core->args['page_title'],
                    $core->args['menu_title'],
                    $core->args['page_permissions'],
                    $core->args['page_slug'],
                    array(
                        $this,
                        'generate_panel',
                    ),
                    $core->args['menu_icon'],
                    $core->args['page_priority']
                );
kprovance commented 2 years ago

I'm not seeing this in my notices or error logs. Please describe the steps you are taking.

andrejarh commented 2 years ago

If the config file has this line: 'page_priority' => null, like in official sample config: https://github.com/reduxframework/redux-framework-4/blob/master/sample/sample-config.php then PHP notice appears.

Setting this to any number resolves the issue.

kprovance commented 2 years ago

This version of Redux 4 in this repo is no longer supported. Please use this one: https://github.com/reduxframework/redux-framework

If this issue persists after that, create a ticket there. Please be mindful of the posting instructions, as we require specific information for support. Thanks.

andrejarh commented 2 years ago

i tested it on latest release 4.3.14 4.3.14

kprovance commented 2 years ago

Please post in the proper repo, and please follow the posting instructions. Specific information in required.