mirai-mamori / Sakurairo

一个多彩、轻松上手、体验完善,具有强大自定义功能的WordPress主题(基于Sakura主题,支持简繁英日多语言)A Colorful, Easy-to-use, Perfect Experience, and Powerful Customizable WordPress Theme (Based on Theme Sakura. Support Simplified Chinese, Traditional Chinese, English and Japanese languages)
https://docs.fuukei.org
GNU General Public License v2.0
2.95k stars 354 forks source link

登录页面模版验证码模块没有嵌入显示 #901

Closed BigdataZjk closed 1 month ago

BigdataZjk commented 2 months ago

问题出处:

登录页面模版(/Sakurairo/user/page-login.php)

实际行为描述:

打开自定义登录页面,等待数秒后没有验证码区域出现

预期的行为:

打开自定义登录页面,验证区域展示正常,并且功能正常,输入正确的账号密码后点击登录能正常登录

复现步骤:

1、新建登录页面,使用主题自带的"登录页面模版",且不添加任何区块或内容 2、主题设置内,开启验证码(主题内建或Vaptcha) 3、主题设置内,指定登录页面为第1步新建的登录页面 4、打开一个浏览器隐私模式标签页,访问第1步登录页面

配置与环境:

截图(若有)

a02a7c3a66c0432e624fdd29f010c946

补充信息:

平台:macOS 13.1 (22C65)

github-actions[bot] commented 2 months ago

@BigdataZjk,感谢你给 sakurairo 提出了 issue。ヾ(≧▽≦*)o 请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

SnowSwordScholar commented 2 months ago

主题版本 2.6.2 遇到了相似的问题,迁移博客后登录界面只有在将主题文件夹重命名后才可正常登录,登陆时候报错:

错误详情 ``` 错误详情 ============ 错误类型 E_ERROR 发生在文件 /www/sites/[mysite/index/wp-content/themes/Sakurairo-2.6.2/inc/classes/Captcha.php](http://mysite/index/wp-content/themes/Sakurairo-2.6.2/inc/classes/Captcha.php) 的 67 行。错误信息:Uncaught Error: Call to undefined function Sakura\API\imagecreatetruecolor() in /www/sites/[mysite/index/wp-content/themes/Sakurairo-2.6.2/inc/classes/Captcha.php:67](http://mysite/index/wp-content/themes/Sakurairo-2.6.2/inc/classes/Captcha.php:67) Stack trace: #0 /www/sites/[mysite/index/wp-content/themes/Sakurairo-2.6.2/functions.php(2199](http://mysite/index/wp-content/themes/Sakurairo-2.6.2/functions.php(2199)): Sakura\API\Captcha->create_captcha_img() #1 /www/sites/[mysite/index/wp-includes/class-wp-hook.php(324](http://mysite/index/wp-includes/class-wp-hook.php(324)): login_CAPTCHA('') #2 /www/sites/[mysite/index/wp-includes/class-wp-hook.php(348](http://mysite/index/wp-includes/class-wp-hook.php(348)): WP_Hook->apply_filters('', Array) #3 /www/sites/[mysite/index/wp-includes/plugin.php(517](http://mysite/index/wp-includes/plugin.php(517)): WP_Hook->do_action(Array) #4 /www/sites/[mysite/index/wp-login.php(1519](http://mysite/index/wp-login.php(1519)): do_action('login_form') #5 {main} thrown ```
登录界面截图 ![图片](https://github.com/mirai-mamori/Sakurairo/assets/73566969/247b0702-7474-4dac-91e5-6edcb0395083)

关闭 定制登录界面 选项无效,关闭内建验证码时候登录页面可以正常加载。 迁移前的博客没此问题

kanodaisuki commented 2 months ago

主题版本 2.6.2 遇到了相似的问题,迁移博客后登录界面只有在将主题文件夹重命名后才可正常登录,登陆时候报错:

错误详情

错误详情
============
错误类型 E_ERROR 发生在文件 /www/sites/[mysite/index/wp-content/themes/Sakurairo-2.6.2/inc/classes/Captcha.php](http://mysite/index/wp-content/themes/Sakurairo-2.6.2/inc/classes/Captcha.php) 的 67 行。错误信息:Uncaught Error: Call to undefined function Sakura\API\imagecreatetruecolor() in /www/sites/[mysite/index/wp-content/themes/Sakurairo-2.6.2/inc/classes/Captcha.php:67](http://mysite/index/wp-content/themes/Sakurairo-2.6.2/inc/classes/Captcha.php:67)
Stack trace:
#0 /www/sites/[mysite/index/wp-content/themes/Sakurairo-2.6.2/functions.php(2199](http://mysite/index/wp-content/themes/Sakurairo-2.6.2/functions.php(2199)): Sakura\API\Captcha->create_captcha_img()
#1 /www/sites/[mysite/index/wp-includes/class-wp-hook.php(324](http://mysite/index/wp-includes/class-wp-hook.php(324)): login_CAPTCHA('')
#2 /www/sites/[mysite/index/wp-includes/class-wp-hook.php(348](http://mysite/index/wp-includes/class-wp-hook.php(348)): WP_Hook->apply_filters('', Array)
#3 /www/sites/[mysite/index/wp-includes/plugin.php(517](http://mysite/index/wp-includes/plugin.php(517)): WP_Hook->do_action(Array)
#4 /www/sites/[mysite/index/wp-login.php(1519](http://mysite/index/wp-login.php(1519)): do_action('login_form')
#5 {main}
  thrown

登录界面截图 关闭 定制登录界面 选项无效,关闭内建验证码时候登录页面可以正常加载。 迁移前的博客没此问题

验证码能力依赖于imagemagick扩展,请自行安装 imagemagick PHP扩展。