Skip Navigation

[Resolved] Access: displaying content template when user doesn't have read permissions

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.

This topic contains 5 replies, has 2 voices.

Last updated by Luo Yang 9 months, 3 weeks ago.

Assigned support staff: Luo Yang.

Author
Posts
#1864141
Screenshot 3.png
Screenshot 2.png
Screenshot 1.png

I am trying to:

I have a post group called "Canadian Only Products" which contains one Product, and is set to display a content template when a user doesn't have read permissions (see screenshot 1 and 2)

Simple enough, but the problem is that my content template only overrides the full description in the tabs down the bottom (see screenshot 3) and the rest of the product (including add to cart) is still visible...

Link to a page where the issue can be seen:

hidden link

I expected to see:

The content template I'd set

Instead, I got:

The regular product template with the content template in the description position.

I've given access details, but please be aware that this is a live website. How do I sort this?

#1864315

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Hello,

I have tried it in my localhost with a fresh WP installation + the latest version of Toolset plugins, it works fine.

So the problem you mentioned above is abnormal, please check these:
1) Make sure you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/

2) In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2020, deactivate all custom PHP/JS code snippets, and test again

3) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/

4) If the problem still persists, please provide database dump file(ZIP file) of your website, you can put the package files in your own google drive disk, share the link only, also point out the problem user role name or username, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#1865219
Screen Shot 2020-12-04 at 2.33.59 PM.png

Hi Luo, thanks for your message. I have just tried the same with fresh WP + Toolset + Woocommerce and it does not work fine - (see attached screenshot)

Perhaps I wasn't clear, but the issue is with Woocommerce products. I should have specified that in my first message. You'll note that Access has only overridden the description content in the tab down the bottom, not the whole page. Users can see the rest of the product content, and add to cart etc, which isn't good!

#1865337

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

I have tried it again in my localhost, it works fine, login as an user of other user role, I see 404 error in front-end of this product post, user can not see any content of this product post at all.

If you need more assistance for it, please provide your test site credentials in below private message box, I can setup a demo for you.
Private message box enabled.

#1865409
Screen Shot 2020-12-04 at 8.14.51 PM.png

Hi Luo, as per my first message, I'm trying to display a content template containing an error message, not the 404 message. 404 message works fine.

I am using the built in Toolset setting to display a content template, as per the screenshot, and it's causing the issue I have identified above.

#1865437

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Thanks for the details, please try these:
1) Install Toolset WooCommerce Blocks plugin in your wesbite:
2) Dashboard-> Toolset-> WooCommerce Blocks
in section "Product Template File", enable option " WooCommerce Views plugin default single product template (single-product.php) ", and test again.

More help:
https://toolset.com/course/custom-woocommerce-sites/