MENU

Typecho 1.2 CommentPush 解决方案

解决Post出错以及“必须选择一项推送服务”的问题

使用插件Player626/CommentPush

1. Post 报错

Argument 1
passed to Typecho\Widget::__construct()must bean instance of Typecho\Widget\Request,instance of Typecho\Request given,called in /www/wwwroot/typecho/usr/plugins/pluginsCommentPush/lib/SmtpService.php on line 171

解决办法

CommentPush 的 /lib/SmtpService.php

widget = new $className(Typecho_Request::getInstance(), Typecho_Widget_Helper_Empty::getInstance());

改成

$widget = $className::alloc();

禁用后重新启用即可~

2. 提示"必须选择一项推送服务"

参考一份CommentPush的PR
将128行的'services'修改为[]

// 第128行
       ], 'services', _t('推送服务 多选同时推送'), _t('插件作者:<a href="https://blog.gaobinzhan.com">高彬展</a>&nbsp;<a href="https://blog.say521.cn/">奥秘Sir</a>'));

改为

// 第128行
       ], [], _t('推送服务 多选同时推送'), _t('插件作者:<a href="https://blog.gaobinzhan.com">高彬展</a>&nbsp;<a href="https://blog.say521.cn/">奥秘Sir</a>'));
最后编辑于: 2025 年 04 月 26 日
返回文章列表 打赏
本页链接的二维码
打赏二维码
添加新评论

已有 3 条评论
  1. 芭芭雅嘎 芭芭雅嘎        

    以前用typecho邮件评论也搞了我很久,最后还是解决了。

  2. vian vian        

    还是有一点问题
    插件设置时 选择过推送服务点击保存会提示“必须选择一项推送服务”实际上已经选择了 但是保存不上@(笑尿)

  3. linkkk linkkk        

    学习