WPDiscourse - 登出无效

?request=logout

导致以下结果

致命错误:无法将对象 stdClass 用作数组,位于 /var/www/vhosts/localhost/html/wp-includes/http.php:251 堆栈跟踪:#0 /var/www/vhosts/localhost/html/wp-content/plugins/wp-discourse/lib/plugin-utilities.php(188): wp_remote_retrieve_response_code() #1 /var/www/vhosts/localhost/html/wp-content/plugins/wp-discourse/lib/sso-client/client.php(477): WPDiscourse\DiscourseBase->validate() #2 /var/www/vhosts/localhost/html/wp-includes/class-wp-hook.php(307): WPDiscourse\SSOClient\Client->logout_from_discourse() #3 /var/www/vhosts/localhost/html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() #4 /var/www/vhosts/localhost/html/wp-includes/plugin.php(476): WP_Hook->do_action() #5 /var/www/vhosts/localhost/html/wp-includes/pluggable.php(1104): do_action() #6 /var/www/vhosts/localhost/html/wp-includes/pluggable.php(660): wp_clear_auth_cookie() #7 /var/www/vhosts/localhost/html/wp-content/plugins/wp-discourse/lib/sso-client/query-redirect.php(68): wp_logout() #8 /var/www/vhosts/localhost/html/wp-includes/class-wp-hook.php(307): WPDiscourse\SSOClient\QueryRedirect->discourse_sso_url_redirect() #9 /var/www/vhosts/localhost/html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() #10 /var/www/vhosts/localhost/html/wp-includes/plugin.php(524): WP_Hook->do_action() #11 /var/www/vhosts/localhost/html/wp-includes/class-wp-query.php(1104): do_action_ref_array() #12 /var/www/vhosts/localhost/html/wp-includes/class-wp-query.php(1792): WP_Query->parse_query() #13 /var/www/vhosts/localhost/html/wp-includes/class-wp-query.php(3586): WP_Query->get_posts() #14 /var/www/vhosts/localhost/html/wp-includes/class-wp-query.php(3718): WP_Query->query() #15 /var/www/vhosts/localhost/html/wp-content/plugins/happyfiles-pro/includes/data.php(197): WP_Query->__construct() #16 /var/www/vhosts/localhost/html/wp-includes/class-wp-hook.php(307): HappyFiles\Data::get_folders() #17 /var/www/vhosts/localhost/html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() #18 /var/www/vhosts/localhost/html/wp-includes/plugin.php(476): WP_Hook->do_action() #19 /var/www/vhosts/localhost/html/wp-settings.php(598): do_action() #20 /var/www/vhosts/localhost/html/wp-config.php(85): require_once('...') #21 /var/www/vhosts/localhost/html/wp-load.php(50): require_once('...') #22 /var/www/vhosts/localhost/html/wp-blog-header.php(13): require_once('...') #23 /var/www/vhosts/localhost/html/index.php(17): require('...') #24 {main} 在 /var/www/vhosts/localhost/html/wp-includes/http.php 第 251 行抛出
2 个赞

我明天早上欧洲中部时间第一件事就来看看。

1 个赞

没问题,谢谢。可能是我这边的问题,但如果你能复现的话,知道一下也好。

这是最新版本的 WordPress 和 Discourse Connect 以及 Discourse。

它也是 PHP 8(这可能是问题所在?)

我将 DiscourseConnect 用作客户端而不是提供者,不知道这是否重要?

我最终会将其切换到 WordPress 作为提供者,但我需要确定迁移所有用户的最佳方法 :laughing:

2 个赞

该主题已在 10 小时后自动关闭。不再允许回复。

@Fma965 这是一个真正的bug。它已经存在将近一年了。当

  • 使用 WP 作为 DiscourseConnect 客户端时;
  • 启用同步登出时;以及
  • (这也取决于您的 php 错误处理)
    时会出现此问题。

感谢您的报告!

一旦此 PR 被合并并且 2.4.5 发布,它将被修复。

抄送 @simon

2 个赞

感谢 @Fma965@angusWP Discourse 2.4.5 版本现已在 WordPress 存储库中提供。

2 个赞

谢谢 Angus,我已经把 SSO 方向改过来了,比我想象的要简单,只需导入用户并将其标记为已验证,然后让用户重置密码即可。

不过,因为这样我无法进行测试,但我相信它能按预期工作,感谢你这么快就解决了。

也感谢 @simon 发布了它。

2 个赞