Skip to:
Content
Pages
Categories
Search
Top
Bottom

Warning After Install of Multisite Shared Menus


  • ma3ry
    Participant

    @ma3ry

    I installed Multisite Shared Menus and all works well on main domain and six of my seven sub-domains, but on my Dating Service, when a logged in member clicks on “Members” we get a list of about 20 lines of the same warning as follows:

    Warning: in_array() expects parameter 2 to be array, null given in /plugins/buddypress/bp-core/bp-core-filters.php on line 199

    I am using WP 4.8, BP 2.8.2, GeneratePress Child Theme, but the issue is also there using Twenty-Sixteen

    I have deleted BP and reinstalled but it didn’t help. Can you give me some idea of how I might fix this problem please.

Viewing 10 replies - 1 through 10 (of 10 total)

  • Henry Wright
    Moderator

    @henrywright

    The warning is referring to a line in bp_core_menu_highlight_parent_page(). The function adds CSS classes to the page. This is hackish but you could try this until you find a better solution.

    add_action( 'init', function() {
        remove_filter( 'page_css_class', 'bp_core_menu_highlight_parent_page', 10, 2 );
    } );

    Also you shouldn’t have WP_DEBUG set to true on your live site. Better to have a development site parallel your production site and use WP_DEBUG in that environment.


    ma3ry
    Participant

    @ma3ry

    Thank you for your response. I tried adding it to the bp-core-filters.php file but it didn’t help. I also tried adding it as an mu-plugin, and also in my child-theme functions.php file, but none of them fixed the problem.

    Where exactly should I be adding this code please.
    Thanks!


    Henry Wright
    Moderator

    @henrywright

    I hadn’t actually tested so it may be that the snippet doesn’t work. bp-custom.php is where it should go. You could try hooking to wp instead of init.


    ma3ry
    Participant

    @ma3ry

    Thank you. I put the code in bp-custom.php but it didn’t work.

    I don’t know how to hook to wp instead of init.


    Henry Wright
    Moderator

    @henrywright

    In the code snippet I posted, try replacing init with wp. If that doesn’t work then the problem would need some debugging.


    ma3ry
    Participant

    @ma3ry

    Thank you but it still doesn’t work. I appreciate you trying though. Thank you again.


    Henry Wright
    Moderator

    @henrywright

    It might be worth messaging the Multisite Shared Menu author. If the plugin is causing PHP notices then likely the author will want to clean those up.


    ma3ry
    Participant

    @ma3ry

    Thank you. I wrote to the support forums several days ago but nobody has replied. I will try to find the author.


    Henry Wright
    Moderator

    @henrywright

    You could try opening an issue here:

    https://github.com/bengreeley/multisitesharedmenu/issues


    ma3ry
    Participant

    @ma3ry

    Thank you so much Henry. I have done as you suggest. Much appreciated!

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