Skip Navigation

[Resolved] redirection to a 404 page when limited access not working

This support ticket is created 4 years, 10 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.

Our next available supporter will start replying to tickets in about 2.09 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Karachi (GMT+05:00)

This topic contains 10 replies, has 2 voices.

Last updated by Waqar 4 years, 9 months ago.

Assisted by: Waqar.

Author
Posts
#1234558
Contrôle_d_accès_‹_PRIDEmotion_—_WordPress.jpg

I am trying to:
I have a group called "abonné"

I don't want that the role "amelia employee" acess to the page that "abonné" can see.
And this works fine.

But when the "amelia employee" go on a page that is not accessible for them, i would like them to see the page 404.
When i set up this in the group of publication, instead of showing the page 404, it shows the page that is not accessible for them!!

Could you have a look into this?

#1234933

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Silvia,

Thank you for contacting us and I'll be happy to assist.

I tested this with similar settings on my own website, but couldn't reproduce the issue.

Your website seems to be running the older ( 2.6.2 ) version of Toolset Access plugin. There were some improvements added to the plugin's 2.7 version for a similar issue.

I'll recommend to update Toolset Access and all other plugins to the latest version and then check the page again.

I hope this helps and please let me know how it goes.

regards,
Waqar

#1234935

Hello thanks for your answer but it seems that when i update the access plugin, nothing goes well anymore when i login in as an customer. If you want you can test it, i can give you a login adress to test the customer role if i can hide it in the forum.

#1234995

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Silvia,

Thanks for writing back.

Can you please share more specific details around what is affected after you update the Access plugin?

You're also welcome to share details of a test user ( customer ), in reply to this message.
( your next reply will be private )

Important note: Please make a complete backup copy of the website, before sharing the test user's details.

regards,
Waqar

#1235000
#1235474

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Silvia,

Thank you for sharing these details.

I can see the error that you shared on your website when logged-in as a "customer", but couldn't reproduce it on my own.

To troubleshoot this in more detail, I'll need a copy of your website, where the issue is reproducible.

Details on how to share the website's copy are available at:
https://toolset.com/faq/provide-supporters-copy-site/

Note: Your next reply will be private so that you can share the information, securely.

regards,
Waqar

#1236150
#1237025

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Silvia,

Thank you for sharing the duplicator package.

I was able to deploy the clone of your website successfully and currently performing some tests.

Will share my findings, as soon as this troubleshooting completes.

Thank you for your patience.

regards,
Waqar

#1238021

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Silvia,

Thank you for waiting while I performed some troubleshooting with your website's copy.

I was able to upload to the latest version of the Toolset Access plugin ( 2.7.1 ) without any errors or a blank screen, by following these steps:

1. Please go to WP Admin -> Plugins and deactivate the older Toolset Access plugin.

2. Download the latest Toolset Access plugin ( 2.7.1 ) from the download page ( https://toolset.com/download/toolset-access/#changelog ) and unzip its files.

3. Through your hosting's file manager or FTP access, delete the folder named "types-access" from " / wp-content / plugins " and then upload the folder of the same name, that was downloaded in step 2.

4. Activate the Toolset Access plugin and make sure to clear all involved caches, both at the plugins level and at the hosting server's level.

Once these steps have been completed, you'll note that there will no error/blank screen and the originally reported issue of the 404 page not showing for "amelia employee" users, will also be fixed.

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#1238216

Hello, thanks for the procedure, but I did what you said

- cleared the cache with WP rocket,
- cleared my caches in navigators,
- cleared the supercache on my server

but the problem after a subscription is exactely the same : 🙁

Fatal error: Uncaught Error: Class 'OTGS\Toolset\Access\Controllers\UploadPermissions' not found in /home/commonp4/public_html/pridemotion.com/wp-content/plugins/types-access/application/models/capabilities.php:594 Stack trace: #0 /home/commonp4/public_html/pridemotion.com/wp-content/plugins/types-access/application/controllers/filters/backend_filters.php(383): OTGS\Toolset\Access\Models\Capabilities->get_capabilities_by_user_permissions(Array, Array, Array, Object(WP_User)) #1 /home/commonp4/public_html/pridemotion.com/wp-includes/class-wp-hook.php(286): OTGS\Toolset\Access\Controllers\Filters\BackendFilters->toolset_access_has_cap_filter(Array, Array, Array, Object(WP_User)) #2 /home/commonp4/public_html/pridemotion.com/wp-includes/plugin.php(208): WP_Hook->apply_filters(Array, Array) #3 /home/commonp4/public_html/pridemotion.com/wp-includes/class-wp-user.php(768): apply_filters('user_has_cap', Array, Array, Array, Object(WP_User)) #4 /home/commonp4/public_html/pridemotion.com/wp-includes/capabilities.php(643): WP_User- in /home/commonp4/public_html/pridemotion.com/wp-content/plugins/types-access/application/models/capabilities.php on line 594

#1238683

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Silvia,

Thanks for the update and sorry to learn that the issue still persists.

I performed some more tests with your website's backup copy but still couldn't reproduce the same error. This suggests that the issue is specific to your website or server environment.

It is important to note that an error such as this would appear if some of the files in the Toolset Access plugin are missing, corrupted or are not accessible.

I'll suggest disabling WP Rocket plugin and the hosting's cache features until this issue is sorted out.

You can also turn on WordPress debugging for additional insights into errors and warnings, by changing the following line in the website's "wp-config.php" file, from:
https://codex.wordpress.org/Debugging_in_WordPress


define('WP_DEBUG', false);

To:


define('WP_DEBUG', true);

It would also be a good idea to contact your hosting support team and request them to check if the server's file permissions are set as recommended by WordPress:
https://wordpress.org/support/article/changing-file-permissions/

Hope these points will help and let me know how it goes.

regards,
Waqar

#1239083

Hello,

I spoke with my hosting and they confirm that all the access/permission are correct.
We deleted all the caches (server) and i desactivated WP rocket but the problem is always the same.

Here the error log for you to see if you can have a deeper look into this :

[03-May-2019 09:36:05 UTC] PHP Fatal error: Uncaught Error: Class 'OTGS\Toolset\Access\Controllers\UploadPermissions' not found in /home/commonp4/staging/7/wp-content/plugins/types-access/application/models/capabilities.php:594
Stack trace:
#0 /home/commonp4/staging/7/wp-content/plugins/types-access/application/controllers/filters/backend_filters.php(383): OTGS\Toolset\Access\Models\Capabilities->get_capabilities_by_user_permissions(Array, Array, Array, Object(WP_User))
#1 /home/commonp4/staging/7/wp-includes/class-wp-hook.php(286): OTGS\Toolset\Access\Controllers\Filters\BackendFilters->toolset_access_has_cap_filter(Array, Array, Array, Object(WP_User))
#2 /home/commonp4/staging/7/wp-includes/plugin.php(208): WP_Hook->apply_filters(Array, Array)
#3 /home/commonp4/staging/7/wp-includes/class-wp-user.php(768): apply_filters('user_has_cap', Array, Array, Array, Object(WP_User))
#4 /home/commonp4/staging/7/wp-includes/capabilities.php(643): WP_User->has_cap('upload_files')
#5 /home/commonp4/staging/7/wp-content/themes/Divi-child/functions.php(59): current in /home/commonp4/staging/7/wp-content/plugins/types-access/application/models/capabilities.php on line 594
[03-May-2019 09:58:57 UTC] .../AnimatedLinks/AnimatedLinks.php:37 DIVIENHANCER_AnimatedLinks::get_advanced_fields_config():
You're Doing It Wrong! DIVIENHANCER_AnimatedLinks::$advanced_tab_options doesn't exist.

[03-May-2019 09:58:57 UTC] .../builder/class-et-builder-element.php:276 ET_Builder_Element::__construct():
You're Doing It Wrong! Module setting definition for icon has a deprecated value: 'et_pb_get_font_icon_list' for parameter 'renderer'. Use 'select_icon' instead.

[03-May-2019 09:58:57 UTC] .../builder/class-et-builder-element.php:276 ET_Builder_Element::__construct():
You're Doing It Wrong! You're using wrong type for the 'main_color'. It should be 'color-alpha' instead of 'color'.

[03-May-2019 09:58:57 UTC] .../carouselChild/carouselChild.php:85 DIVIENHANCER_carouselChild::get_advanced_fields_config():
You're Doing It Wrong! DIVIENHANCER_carouselChild::$advanced_tab_options doesn't exist.

[03-May-2019 09:58:57 UTC] .../builder/class-et-builder-element.php:276 ET_Builder_Element::__construct():
You're Doing It Wrong! Module setting definition for icontitle has a deprecated value: 'et_pb_get_font_icon_list' for parameter 'renderer'. Use 'select_icon' instead.

[03-May-2019 09:58:57 UTC] .../tagCloudChild/tagCloudChild.php:154 DIVIENHANCER_tagCloudChild::get_advanced_fields_config():
You're Doing It Wrong! DIVIENHANCER_tagCloudChild::$advanced_tab_options doesn't exist.

[03-May-2019 09:58:57 UTC] .../timeLineChild/timeLineChild.php:126 DIVIENHANCER_timelineChild::get_advanced_fields_config():
You're Doing It Wrong! DIVIENHANCER_timelineChild::$advanced_tab_options doesn't exist.

#1239650

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Silvia,

Thank you for sharing the error log, but I don't see any other related errors/warnings in there.

Would it be possible for you to deploy the clone of your website to a different server?
( other than the current host Siteground )

If the same website's copy works on a different server, just as I confirmed in my tests, it would mean that this is server specific issue. More specifically, some data is still being loaded through the cache either at the server level or at the CDN level.

In that case, it would be best to take up this matter with the Siteground's support team to make sure only up-to-date content and resources are being loaded.

regards,
Waqar

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.