n/websiteu/oops · 2024-10-10
注册 登录
n/website · 2024-10-10 · 397 次浏览
u/oops白银

Typecho插件启用/禁用 500error错误

求助,不知道咋回事 插件的启用和禁用都提示 无法启用/禁用插件。
看了眼F12 发现是500 Internal Server Error,但是返回插件管理页面后刷新下网页又启用/禁用了
https://www.abc.com/action/plugins-edit?activate=ClearCloudflareCache&_=fce2c80eba81348bf9a9245112b33116

最近也没动啥地方,就昨天弄了下CF SAAS,网站管理面板删了回退源域名,保留了www和跟域名。DNS解析境内 visa.cn 境外1.0.0.5,还添加了个301重定向规则,根域名重定向到www,也就没了。
[upl-image-preview url=https://www.nodeloc.com/uploads/default/2024-10-10/1728545264-273887-image.png]

瞎晃悠的时候看到个typecho专属cf缓存配置规则,我就顺手抄了份,三个规则。
[upl-image-preview url=https://www.nodeloc.com/uploads/default/2024-10-10/1728544822-120394-image.png]
不进行缓存(starts_with(http.request.full_uri, "https://www.abc.com/admin/")) or (starts_with(http.request.full_uri, "https://www.abc.com/search/")) or (starts_with(http.request.full_uri, "https://www.abc.com/action/"))
action是我刚才添加的,发现没用。
登陆和评论不缓存(starts_with(http.request.full_uri, "https://www.abc.com/") and http.cookie contains "**~~~~typecho_authCode" and http.cookie contains "**typecho_uid") or (starts_with(http.request.full_uri, "https://www.abc.com/") and http.cookie contains "_typecho_remember")

缓存所有(starts_with(http.request.full_uri, "https://www.abc.com/") and not http.cookie contains "**~~~~typecho_authCode" and not http.cookie contains "**typecho_uid" and not http.cookie contains "_typecho_remember") or (starts_with(http.request.full_uri, "https://www.abc.com/usr/uploads"))
[upl-image-preview url=https://www.nodeloc.com/uploads/default/2024-10-10/1728544993-7905-image.png]
[upl-image-preview url=https://www.nodeloc.com/uploads/default/2024-10-10/1728545005-68166-image.png]
[upl-image-preview url=https://www.nodeloc.com/uploads/default/2024-10-10/1728545013-628389-image.png]

我开了下开发者模式 然后去开关TYPECHO插件还是一样,不知道是规则问题还是哪的问题,我用的几个插件一直都正常,也不存在插件文件夹名字不对导致的500错误,网上没搜到有关CF和TYPECHO插件之间冲突的问题。

有没有懂的大佬给看看:xhj24:

0
4
登录后参与讨论。

4 条回复

排序
  1. ClassmateShen ⭐️ 王者 MANAGER 2024-10-10

    你把debug模式打开就知道问题出在哪了

    0
  2. oops 白银 楼主 2024-10-10

    @"叫我沈同学"#p109312 :xhj05: 看不懂 问了gpt说可能是缓存也可能是插件本身也可能文件夹权限问题
    无法禁用插件

    ```
    Typecho\Widget\Exception: 无法禁用插件 in /www/wwwroot/xxx.com/var/Widget/Plugins/Edit.php:229
    Stack trace:
    #0 /www/wwwroot/xxx.com/var/Widget/Plugins/Edit.php(314): Widget\Plugins\Edit->deactivate('ClearCloudflare...')
    #1 /www/wwwroot/xxx.com/var/Widget/Action.php(71): Widget\Plugins\Edit->action()
    #2 /www/wwwroot/xxx.com/var/Typecho/Widget.php(155): Widget\Action->execute()
    #3 /www/wwwroot/xxx.com/var/Typecho/Router.php(96): Typecho\Widget::widget('\Widget\Action', NULL, Array)
    #4 /www/wwwroot/xxx.com/index.php(23): Typecho\Router::dispatch()
    #5 {main}

    ```

    0
  3. James 💯 传奇 MANAGER 2024-10-11

    @"Oops"#p109314 看这个日志有点奇怪

    0
  4. oops 白银 楼主 2024-10-11

    @"James"#p109515 捣鼓到现在 没解决 醉了 自带的HelloWord插件也是一样:huaji09:

    0