Skip Navigation

[Resolved] php fatal error

This thread is resolved. Here is a description of the problem and solution.

Problem:

The problem here is that the user is getting the error below when they try to log into their site using a non-admin account.

PHP Fatal error: Uncaught Error: Class 'OTGS\\Toolset\\Access\\Controllers\\UploadPermissions' not found 

Solution:
This is actually a known issue between our Toolset Access plugin and the Enable Media Replace plugin.

A workaround can be found at the link below while our team works on a more permanent solution.
https://toolset.com/errata/fatal-access-error-when-non-admins-log-in/

This support ticket is created 3 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 5 replies, has 3 voices.

Last updated by breo 3 years, 4 months ago.

Assisted by: Shane.

Author
Posts
#2195679

Hello!

When I access with a user account (not admin), WP shows "There has been a critical error on your website".

I have updated all the plugins and WP core.

The most similar support post about this problem is https://toolset.com/forums/topic/fatal-error-uncaught-error-class-after-login/ but not resolves my issue.

The apache log:
[Thu Oct 14 11:55:39.610704 2021] [proxy_fcgi:error] [pid 31260:tid 140401584371456] [client 161.230.242.58:43200] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Class 'OTGS\\Toolset\\Access\\Controllers\\UploadPermissions' not found in /home/agpti/www/wp-content/plugins/types-access/application/models/capabilities.php:613\nStack trace:\n#0 /home/agpti/www/wp-content/plugins/types-access/application/controllers/filters/backend_filters.php(534): OTGS\\Toolset\\Access\\Models\\Capabilities->get_capabilities_by_user_permissions(Array, Array, Array, Object(WP_User))\n#1 /home/agpti/www/wp-includes/class-wp-hook.php(303): OTGS\\Toolset\\Access\\Controllers\\Filters\\BackendFilters->toolset_access_has_cap_filter(Array, Array, Array, Object(WP_User))\n#2 /home/agpti/www/wp-includes/plugin.php(189): WP_Hook->apply_filters(Array, Array)\n#3 /home/agpti/www/wp-includes/class-wp-user.php(786): apply_filters('user_has_cap', Array, Array, Array, Object(WP_User))\n#4 /home/agpti/www/wp-includes/capabilities.php(801): WP_User->has_cap('upload_files')\n#5 /home/agpti/www/wp-includes/capabilities.php(693): user_can(Object(WP_User), 'upload_files')\n#6 /ho...'
[Thu Oct 14 11:55:40.044068 2021] [proxy_fcgi:error] [pid 31260:tid 140401398736640] [client 161.230.242.58:43252] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Class 'OTGS\\Toolset\\Access\\Controllers\\UploadPermissions' not found in /home/agpti/www/wp-content/plugins/types-access/application/models/capabilities.php:613\nStack trace:\n#0 /home/agpti/www/wp-content/plugins/types-access/application/controllers/filters/backend_filters.php(534): OTGS\\Toolset\\Access\\Models\\Capabilities->get_capabilities_by_user_permissions(Array, Array, Array, Object(WP_User))\n#1 /home/agpti/www/wp-includes/class-wp-hook.php(303): OTGS\\Toolset\\Access\\Controllers\\Filters\\BackendFilters->toolset_access_has_cap_filter(Array, Array, Array, Object(WP_User))\n#2 /home/agpti/www/wp-includes/plugin.php(189): WP_Hook->apply_filters(Array, Array)\n#3 /home/agpti/www/wp-includes/class-wp-user.php(786): apply_filters('user_has_cap', Array, Array, Array, Object(WP_User))\n#4 /home/agpti/www/wp-includes/capabilities.php(801): WP_User->has_cap('upload_files')\n#5 /home/agpti/www/wp-includes/capabilities.php(693): user_can(Object(WP_User), 'upload_files')\n#6 /ho...', referer: hidden link
[Thu Oct 14 11:55:54.483912 2021] [proxy_fcgi:error] [pid 31541:tid 140401356773120] [client 161.230.242.58:44326] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Class 'OTGS\\Toolset\\Access\\Controllers\\UploadPermissions' not found in /home/agpti/www/wp-content/plugins/types-access/application/models/capabilities.php:613\nStack trace:\n#0 /home/agpti/www/wp-content/plugins/types-access/application/controllers/filters/backend_filters.php(534): OTGS\\Toolset\\Access\\Models\\Capabilities->get_capabilities_by_user_permissions(Array, Array, Array, Object(WP_User))\n#1 /home/agpti/www/wp-includes/class-wp-hook.php(303): OTGS\\Toolset\\Access\\Controllers\\Filters\\BackendFilters->toolset_access_has_cap_filter(Array, Array, Array, Object(WP_User))\n#2 /home/agpti/www/wp-includes/plugin.php(189): WP_Hook->apply_filters(Array, Array)\n#3 /home/agpti/www/wp-includes/class-wp-user.php(786): apply_filters('user_has_cap', Array, Array, Array, Object(WP_User))\n#4 /home/agpti/www/wp-includes/capabilities.php(801): WP_User->has_cap('upload_files')\n#5 /home/agpti/www/wp-includes/capabilities.php(693): user_can(Object(WP_User), 'upload_files')\n#6 /ho...'
[Thu Oct 14 11:55:55.063404 2021] [proxy_fcgi:error] [pid 31541:tid 140401339987712] [client 161.230.242.58:44330] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Class 'OTGS\\Toolset\\Access\\Controllers\\UploadPermissions' not found in /home/agpti/www/wp-content/plugins/types-access/application/models/capabilities.php:613\nStack trace:\n#0 /home/agpti/www/wp-content/plugins/types-access/application/controllers/filters/backend_filters.php(534): OTGS\\Toolset\\Access\\Models\\Capabilities->get_capabilities_by_user_permissions(Array, Array, Array, Object(WP_User))\n#1 /home/agpti/www/wp-includes/class-wp-hook.php(303): OTGS\\Toolset\\Access\\Controllers\\Filters\\BackendFilters->toolset_access_has_cap_filter(Array, Array, Array, Object(WP_User))\n#2 /home/agpti/www/wp-includes/plugin.php(189): WP_Hook->apply_filters(Array, Array)\n#3 /home/agpti/www/wp-includes/class-wp-user.php(786): apply_filters('user_has_cap', Array, Array, Array, Object(WP_User))\n#4 /home/agpti/www/wp-includes/capabilities.php(801): WP_User->has_cap('upload_files')\n#5 /home/agpti/www/wp-includes/capabilities.php(693): user_can(Object(WP_User), 'upload_files')\n#6 /ho...', referer: hidden link

Thanks

#2195711

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

This is a known issue: https://toolset.com/errata/fatal-access-error-when-non-admins-log-in/

Note the workaround available there, and please subscribe to that erratum for news when a solution is available.

#2195719

This topic is related the plugin Enable Media Replace. I haven't this plugin installed.

#2195723

This post/errata is about the Enable Media Replace plugin, but I haven't it installed.

#2195907

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Breo,

Are you able to log into your site with an admin account ?

If so can you temporarily disable all your non-toolset plugins and check again to see if the issue still remains. This particular error is so far only seen with the Enable Media Replace plugin when logging in with a non-admin account.

Please let me know.
Thanks,
Shane

#2195937

My issue is resolved now. Thank you!