我刚刚将 #chat-plugin 更新到了最新的提交 76ff2ba,我注意到了一些错误,导致它几乎无法使用。另外:我不记得实例上之前的插件提交状态是什么,也不知道如何查找——有人知道如何查找吗?
我看到的错误至少有:
停靠的频道列表显示为空
它会回到显示零个频道和默认文本:“您还没有加入任何频道。单击此处查看可用频道。”
当我单击链接查看可用频道时,它不显示任何内容,并导航整个页面显示“服务器错误\n尝试加载 /chat/chat_channels/all.json 时出错\n错误代码:500 错误”
但是,当我单击铅笔图标并尝试创建具有类别或先前名称的新频道时,它会拒绝,并显示:“您向请求提供了无效参数:此类别和名称的频道已存在”
单击全屏图标会导航到一个仅显示加载旋转图标的页面。
个人聊天列表为空
我能够添加之前与之聊过的人,并且聊天显示正常,我也能够发送消息。
in_reply_to 消息在新消息中不显示,但显示在旧消息中,所以我不知道是否有任何更改,但我自定义了回复消息,所以这可能是我的问题。
从个人聊天停靠消息返回的按钮单击时不起作用,而以前单击它可以返回聊天列表。
如果您需要,我可以尝试查找错误日志并在此处发布或发送到其他地方。我尝试过在安全模式下运行,并关闭了主题,但这似乎没有解决任何问题。
编辑:
我在浏览器控制台中看到的错误日志:
Failed to load resource: the server responded with a status of 500 () - /chat/chat_channels.json:1
Uncaught
Object
errorThrown: ""
jqXHR: {readyState: 4, getResponseHeader: ƒ, getAllResponseHeaders: ƒ, setRequestHeader: ƒ, overrideMimeType: ƒ, …}
textStatus: "error"
[[Prototype]]: Object
at _vendor-f78d12cebd7a573d3ed1aee5e766ee89.js:2177
与此同时,我将尝试将插件回滚到之前的提交,也许是大约 15 次提交之前,看看是否有效。我不知道是否有简单的方法可以做到这一点,现在,我将尝试这里的解决方法:
Okay, @Falco 's solution worked, but I had to go about it in a round about way.
I forked the original repo
Cloned it locally on my dev machine
Created my branch from the desired commit
git branch foo ec64ae8
Pushed that branch to my github
git push -u origin foo
Updated my app.yml with
git clone -b foo git@github.com:my-repo.git
Seems like there should be an easier way, but this gets the job done. Thanks for the direction @Falco !
2 个赞
好的,在 @markvanlan 、@sam 、@j.jaffeux 和 @REALITY 的帮助下,我在聊天中解决了这个问题:
摘要
我的网站上仍然安装了 topic list previews 插件,尽管它没有启用,但它在服务器端造成了问题。
我从 app.yml 文件中删除了它并进行了重建,它又可以正常工作了。
然后根据这个链接将其添加为主题组件:
Topic List Previews plugin was deprecated in November 2021 and is now a Theme Component
感谢大家的帮助!
详情
(通过在浏览器中实例的基础 URL 后面附加 /logs 找到)
StandardError (Attempted to access the non preloaded custom field 'topic_list_tiles'. This is disallowed to prevent N+1 queries.) app/models/concerns/has_custom_fields.rb:173:in ’ (eval):35:in _fa
app/models/concerns/has_custom_fields.rb:173:in `[]'
plugins/discourse-topic-previews/plugin.rb:78:in `block (3 levels) in activate!'
(eval):35:in `_fast_attributes'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:456:in `attributes'
plugins/discourse-custom-wizard/extensions/custom_field/serializer.rb:4:in `attributes'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:480:in `_serializable_hash'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:359:in `serializable_hash'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:347:in `as_json'
plugins/discourse-chat/app/serializers/chat_channel_serializer.rb:38:in `chatable'
(eval):4:in `_fast_attributes'
4 个赞
Topic List Previews 插件已于 2021 年 11 月弃用,现已成为 主题组件
6 个赞
system
(system)
关闭
2022 年2 月 6 日 19:44
4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.