WordPress.org

Forums

WP Symposium Toolbar
[resolved] Warning: Invalid argument supplied for foreach() (5 posts)

  1. RitroGonpo
    Member
    Posted 1 year ago #

    I am getting the following error message:

    Warning: Invalid argument supplied for foreach() in /home2/zac/public_html/wp-content/plugins/wp-symposium-toolbar/wp-symposium-toolbar_functions.php on line 43

    This seems to be a conflict with S2Member Framework, a plugin that provides user access control.

    My site's theme is a very basic child of Twenty Eleven, and I'm running only a few other plugins.

    Any thoughts on how I might resolve this issue?

    Thanks!

    ___________

    In case it's helpful, here is the WP Symposium Toolbar plugin settings list:

    wpst_custom_menus => a:1:{i:0;a:3:{i:0;s:9:"wps-login";i:1;s:10:"my-account";i:2;a:1:{i:0;s:12:"wpst_visitor";}}}
    wpst_myaccount_avatar =>
    wpst_myaccount_avatar_small =>
    wpst_myaccount_avatar_visitor =>
    wpst_myaccount_display_name =>
    wpst_myaccount_edit_link =>
    wpst_myaccount_howdy => Welcome, %first_name%
    wpst_myaccount_howdy_visitor =>
    wpst_myaccount_logout_link => on
    wpst_myaccount_rewrite_edit_link =>
    wpst_myaccount_role =>
    wpst_myaccount_username =>
    wpst_style_tb_current => a:19:{s:17:"background_colour";s:7:"#ffffff";s:12:"border_style";s:4:"none";s:11:"font_colour";s:7:"#858585";s:10:"font_style";s:6:"normal";s:11:"font_weight";s:6:"normal";s:9:"font_line";s:4:"none";s:9:"font_case";s:6:"normal";s:13:"font_h_shadow";s:1:"0";s:13:"font_v_shadow";s:1:"0";s:16:"font_shadow_blur";s:1:"0";s:23:"hover_background_colour";s:7:"#ffffff";s:17:"hover_font_colour";s:7:"#858585";s:16:"hover_font_style";s:6:"normal";s:17:"hover_font_weight";s:6:"normal";s:15:"hover_font_line";s:4:"none";s:15:"hover_font_case";s:6:"normal";s:19:"hover_font_h_shadow";s:1:"0";s:19:"hover_font_v_shadow";s:1:"0";s:22:"hover_font_shadow_blur";s:1:"0";}
    wpst_toolbar_comments_bubble => a:4:{i:0;s:13:"administrator";i:1;s:6:"editor";i:2;s:6:"author";i:3;s:11:"contributor";}
    wpst_toolbar_edit_page => a:0:{}
    wpst_toolbar_get_shortlink => a:0:{}
    wpst_toolbar_move_search_field => empty
    wpst_toolbar_my_sites => a:1:{i:0;s:13:"administrator";}
    wpst_toolbar_new_content => a:3:{i:0;s:13:"administrator";i:1;s:6:"editor";i:2;s:6:"author";}
    wpst_toolbar_search_field => a:10:{i:0;s:13:"administrator";i:1;s:6:"editor";i:2;s:6:"author";i:3;s:11:"contributor";i:4;s:10:"subscriber";i:5;s:13:"bbp_keymaster";i:6;s:13:"bbp_moderator";i:7;s:15:"bbp_participant";i:8;s:13:"bbp_spectator";i:9;s:11:"bbp_blocked";}
    wpst_toolbar_site_name => a:0:{}
    wpst_toolbar_updates_icon => a:1:{i:0;s:13:"administrator";}
    wpst_toolbar_user_menu => a:15:{i:0;s:13:"administrator";i:1;s:6:"editor";i:2;s:6:"author";i:3;s:11:"contributor";i:4;s:10:"subscriber";i:5;s:13:"bbp_keymaster";i:6;s:13:"bbp_moderator";i:7;s:15:"bbp_participant";i:8;s:13:"bbp_spectator";i:9;s:11:"bbp_blocked";i:10;s:15:"s2member_level1";i:11;s:15:"s2member_level2";i:12;s:15:"s2member_level3";i:13;s:15:"s2member_level4";i:14;s:12:"wpst_visitor";}
    wpst_toolbar_wp_logo => a:15:{i:0;s:13:"administrator";i:1;s:6:"editor";i:2;s:6:"author";i:3;s:11:"contributor";i:4;s:10:"subscriber";i:5;s:13:"bbp_keymaster";i:6;s:13:"bbp_moderator";i:7;s:15:"bbp_participant";i:8;s:13:"bbp_spectator";i:9;s:11:"bbp_blocked";i:10;s:15:"s2member_level1";i:11;s:15:"s2member_level2";i:12;s:15:"s2member_level3";i:13;s:15:"s2member_level4";i:14;s:12:"wpst_visitor";}
    wpst_toolbar_wp_toolbar => a:14:{i:0;s:13:"administrator";i:1;s:6:"editor";i:2;s:6:"author";i:3;s:11:"contributor";i:4;s:10:"subscriber";i:5;s:13:"bbp_keymaster";i:6;s:13:"bbp_moderator";i:7;s:15:"bbp_participant";i:8;s:13:"bbp_spectator";i:9;s:11:"bbp_blocked";i:10;s:15:"s2member_level1";i:11;s:15:"s2member_level2";i:12;s:15:"s2member_level3";i:13;s:15:"s2member_level4";}
    wpst_toolbar_wp_toolbar_force =>

    http://wordpress.org/plugins/wp-symposium-toolbar/

  2. Guillaume Assire
    Member
    Plugin Author

    Posted 1 year ago #

    I remember one of the sites I visited while ensuring support for WPST had S2M installed and no issue. I just installed it on a test site and couldn't reproduce your issue either. So I'm not sure S2M is the culprit, at least with its default settings.

    There seems to be an offending role in your list of roles. Do you have any role, that would be defined on your site but wouldn't show in the list of roles in WPST options page ?

    Is this a live site with lots of members, if not, would you be happy to open the editor and add a line of code to dump your list of roles on top of pages ?

  3. RitroGonpo
    Member
    Posted 1 year ago #

    Hi Alpha,

    I've accomplished my aim with CSS and functions.php, but thank you for the response. It's good news that the issue seemed to be unique to me.

    I'd be happy to dump the roles on top of pages and report back, if you send the code.

    All the best.

  4. Guillaume Assire
    Member
    Plugin Author

    Posted 1 year ago #

    So if you open the editor for wp-symposium-toolbar_functions.php and add var_dump( $wp_roles->roles ); as the line 42 for instance, it'll dump the array of roles of your site. Could you check it's an array made of slugs => arrays, each of which contains a string and an array of capabilities. All of these values shall be filled and not empty ?

    Nobody else reported anything, but this doesn't mean you're the only one, LOL. Could you answer the question as to whether a role would be missing in the list of roles used by WPS Toolbar (e.g. settings at the "Toolbar" tab), this would help identifying any offending role, and find out what's wrong with it, from the dump.

    Thanks!

  5. Guillaume Assire
    Member
    Plugin Author

    Posted 1 year ago #

    Did you have the opportunity to investigate this issue?

    I've been warned of other conflicts with S2M, more specifically menu items. S2M allows creating menus which items are displayed on a per-role basis individually, while WPST simply displays menu items one after the other :) So I'm afraid I'll need to plan a thorough check to make them work together...

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Symposium Toolbar
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.