Notifications
Clear all

wpForo 1.x.x [Solved] Top menu bar displayed for guests when it's enabled for members

10 Posts
2 Users
3 Reactions
3,141 Views
Robert
Posts: 10591
Admin
Topic starter
(@robert)
Support Team
Joined: 9 years ago
Posted by: Anonymous20

With the 1.5 update, the top menu is LOST for members. Disabling wpforo comes back (options to their profile, the Howdy, search,logoff).

The following capture is with wpForo DISABLED.

@anonymous20,

This post says nothing about Guest view of top admin bar. So I see it's displayed for guests. And I think this is a site specific issue. it seems you have some custom code or other plugins conflicts with wpForo. We don't see such problem on all our websites. if somebody else see this please let us know.

Posts: 1602
(@anonymous20)
Noble Member
Joined: 9 years ago
Posted by: Robert
Posted by: Anonymous20

With the 1.5 update, the top menu is LOST for members. Disabling wpforo comes back (options to their profile, the Howdy, search,logoff).

The following capture is with wpForo DISABLED.

@anonymous20,

This post says nothing about Guest view of top admin bar. So I see it's displayed for guests. And I think this is a site specific issue. it seems you have some custom code or other plugins conflicts with wpForo. We don't see such problem on all our websites. if somebody else see this please let us know.

@Robert i have installed wpForo in my dev system, an empty Wordpress. Not a single change or plugin (apart from The Shield).

See the problem clearly for guests.

https://wpdev.valueweb.gr/

 

Robert
Posts: 10591
Admin
Topic starter
(@robert)
Support Team
Joined: 9 years ago

Ok @anonymous20,

Thank you very much for you time and for this information. In all fresh installations wpForo comes with disabled top admin bar for members so we were not seeing this for guests. Now all is clear. When this option is enabled it also displays for guests. We'll fix this in next version.

As temporary solution I recommend open this file:

/wpforo/wpf-includes/wpf-hooks.php

Find this line:

if( !is_super_admin() && !array_intersect($allowed_roles, (array) WPF()->wp_current_user->roles)

Change to this:

if( !is_super_admin() && is_user_logged_in() && !array_intersect($allowed_roles, (array) WPF()->wp_current_user->roles)
Posts: 1602
(@anonymous20)
Noble Member
Joined: 9 years ago
Posted by: Robert

Ok @anonymous20,

Thank you very much for you time and for this information. In all fresh installations wpForo comes with disabled top admin bar for members so we were not seeing this for guests. Now all is clear. When this option is enabled it also displays for guests. We'll fix this in next version.

As temporary solution I recommend open this file:

/wpforo/wpf-includes/wpf-hooks.php

Find this line:

if( !is_super_admin() && !array_intersect($allowed_roles, (array) WPF()->wp_current_user->roles)

Change to this:

if( !is_super_admin() && is_user_logged_in() && !array_intersect($allowed_roles, (array) WPF()->wp_current_user->roles)

No problem Robert, i'm glad i'm finally able to properly show the problem.

Sometimes it is not easy to do so, keep in mind that English is not my forte (but i'm trying the best i can).

Also this was working right pre-1.5.

 

 

Posts: 1602
(@anonymous20)
Noble Member
Joined: 9 years ago

Fixed in 1.52

Page 2 / 2