Skip Navigation

[Resolved] conditional block not working correctly – current user role not being detected

This support ticket is created 2 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by vickyB 2 years, 4 months ago.

Assisted by: Minesh.

Author
Posts
#2443261
conditional-block-debugging.jpg

Tell us what you are trying to do?
I have 2 x custom user roles - client and inspector - I want to allow the inspector role to see buttons to add posts and hide the buttons from clients.

Is there any documentation that you are following?
Yes - https://toolset.com/course-lesson/using-toolset-conditional-block/
I have set the conditional block conditions to 'Current user role is equal to um_inspector'

Is there a similar example that we can see?
I have attached the debug info and even though I am logged in as an inspector I do not see the buttons and it appears from the debug info that the current user role is not being detected.

What is the link to your site?
hidden link

#2443285

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

That is strange. Can you please share problem URL where you added the conditional block as well as admin access details. Let me review your current setup first.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2443365

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Yes - it seems thats the issue.

As even when I tried to checked with shortcode: Role===[wpv-current-user info="role"], it returns nothing.

Either you should create new role using Toolset Access and assign that role to user and then use that role to check conditionally with conditional block or you should activate ultimate member plugin and see if that works.

#2443409

My issue is resolved now. Thank you! Issue was due to having installed ultimate member first and using an already existing role when UM was deactivated. Thanks Minesh for your help