Skip Navigation

[Resolved] Compatibility issue with Media Replace plugin

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

Problem:

When users with a role lower than administrator log-in the following fatal error may occur, The error was introduced by the 3.6.0 release of the Enable Media Replace plugin.

Solution:

See the workaround of below erratum:

https://toolset.com/errata/fatal-access-error-when-non-admins-log-in/

Relevant Documentation:

This support ticket is created 3 years, 1 month 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 – 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/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by ben 3 years, 1 month ago.

Assisted by: Luo Yang.

Author
Posts
#2238631

ben

你好 Luo Yan,

我的网站昨天更新了几个插件,然后网站就出现了一个问题。我怀疑引起问题的插件是Relevanssi,但不是100%确定。

具体的问题是这样的:网站前台是正常的,网站后台(admin)也是正常的,只是当我的VIP会员登录后,就出现了“遇到了致命错误”提示。

我打开debug模式后,显示的内容如下:

Fatal error: Uncaught Error: Class 'OTGS\Toolset\Access\Controllers\UploadPermissions' not found in /var/www/4liang.com/httpdocs/wp-content/plugins/types-access/application/models/capabilities.php:613 Stack trace: #0 /var/www/4liang.com/httpdocs/wp-content/plugins/types-access/application/controllers/filters/backend_filters.php(534): OTGS\Toolset\Access\Models\Capabilities->get_capabilities_by_user_permissions() #1 /var/www/4liang.com/httpdocs/wp-includes/class-wp-hook.php(303): OTGS\Toolset\Access\Controllers\Filters\BackendFilters->toolset_access_has_cap_filter() #2 /var/www/4liang.com/httpdocs/wp-includes/plugin.php(189): WP_Hook->apply_filters() #3 /var/www/4liang.com/httpdocs/wp-includes/class-wp-user.php(786): apply_filters() #4 /var/www/4liang.com/httpdocs/wp-includes/capabilities.php(801): WP_User->has_cap() #5 /var/www/4liang.com/httpdocs/wp-includes/capabilities.php(693): user_can() #6 /var/www/4liang.com/httpdocs/wp-content/plugins/enable-media-replace/classes/emr-plugin.php(42): current_user_can() #7 /var/www/ in /var/www/4liang.com/httpdocs/wp-content/plugins/types-access/application/models/capabilities.php on line 613

Notice: is_embed的调用方法不正确。条件标签在运行查询之前使用是无效的。这样做的话,返回值只会为false。 请查阅调试WordPress来获取更多信息。 (这个消息是在3.1.0版本添加的。) in /var/www/4liang.com/httpdocs/wp-includes/functions.php on line 5663

Notice: is_search的调用方法不正确。条件标签在运行查询之前使用是无效的。这样做的话,返回值只会为false。 请查阅调试WordPress来获取更多信息。 (这个消息是在3.1.0版本添加的。) in /var/www/4liang.com/httpdocs/wp-includes/functions.php on line 5663
此站点遇到了致命错误。

了解有关对WordPress进行故障排除的更多信息。

当我禁用Toolset Access后,错误消失。

以上就是这个问题的细节,其实我的另外一个网站也碰到过同样的问题,所以我现在都不敢更新插件了。

由于这个问题影响到了我也业务,所以我昨天已经把服务器rollback了,目前这个问题已经解除,但只是临时的。我知道如果我之后更新某个插件,就会碰到同样的问题。

请你帮我看看是哪里出了问题,以及如何修复这个问题。如果你还需要其他信息或者你需要admin账号,请告诉我。

非常感谢
Ben

#2238657

你好 Ben,

这应该是个已知的问题,参考下面这个erratum:
https://toolset.com/errata/fatal-access-error-when-non-admins-log-in/

解决方法是:
As a workaround, either disable the Enable Media Replace plugin, or download to version 3.5.0 (available here)

#2240381

ben

太好了,谢谢你啊。我现在还没有修复,但我想你的解决方法已经说得非常清楚了,我之后去修复,如果有问题我在重新把这个ticket开启。