-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Waline2.5.18前端无法显示评论信息,评论数统计插件显示为0 || [Bug]: Waline2.5.18 front-end cannot display comment information, and the comment number statistics plug-in displays 0 #2591
Comments
看起来是和不同浏览器下 path 路径的编码问题有关系,建议你评论数那设置 https://lcweb.lisenhui.cn/comment?type=count&url=/tech/how-to-restart-wsl2.html&lang=zh-CN It seems to be related to the encoding problem of path path in different browsers. It is recommended that you add https://lcweb.lisenhui.cn/comment?type=count&url=/tech/how-to-restart-wsl2.html&lang=zh-CN |
应该就是编码的问题,如果你自己处理不了建议换一个唯一字段吧,不要用 pathname It should be an encoding problem. If you can't handle it yourself, I suggest you change it to a unique field instead of using pathname |
用这个 Use this |
要不你导出一份数据发我邮箱吧,我查下问题看看 Why don't you export a copy of the data and send it to my email, and I'll check the problem |
已导出发送到你的QQ邮箱,劳烦帮忙看看,谢谢。 It has been exported and sent to your QQ mailbox. Could you please help me take a look? Thank you. |
没有换数据库哦,一直就是使用的leancloud数据存储方式。之前发的那些测试评论已经删除了,只保留了网友有关于CDN屏蔽的讨论。所以这个 自己也测试了好久,似乎和缓存有关系啦,用新的设备访问确实是看不出问题来的。😂 The database has not been changed, and the leancloud data storage method has been used. The test comments previously posted have been deleted, leaving only netizens’ discussions about CDN blocking. So this ![comments](https://private-user-images.githubusercontent.com/1217096/345258330-c6ed250d-11b0-44c2-8c7c-49167182f6dc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOi JnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6Imtle TUiLCJleHAiOjE3MjAxNDIxNzEsIm5iZiI6MTcyMDE0MTg3MSwicGF0aCI6Ii8xMjE3MDk2LzM0 NTI1ODMzMC1jNmVkMjUwZC0xMWIwLTQ0YzItOGM3Yy00OTE2NzE4MmY2ZGMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZ TFNBNTNQUUs0WkElMkYyMDI0MDcwNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQ W16LURhdGU9MjAyNDA3MDVUMDExMTExWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cm U9NGMxMGE5MjY0OWMxZDI0NzYzYTY2ZTc4YTI4MjcxNjk2OWY4NThkOWE2NzMyMTVhZTgzZWY3YzAzOTNmNjc0ZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaW Q9MCZyZXBvX2lkPTAifQ.gXOP2mU0AlTXnscwYgaosSRl2rbvq3ugb_e0BCKqvx0) I have been testing it for a long time, and it seems to be related to the cache. There is indeed no problem when accessing it with a new device. 😂 |
|
好的,谢谢Austin大神,后续我再观察一下。 Okay, thank you Austin, I will take a closer look later. |
@lizheming 有什么办法在count和comment请求时,在URL后面添加个自定义参数呢?比如ts=1720159903 |
可以自己自定义客户端实现。 You can customize the client implementation yourself. |
有没可参考的案例学习下,在手册上似乎没有找到这部分的说明,谢谢。 Is there any case study that I can refer to? I can’t seem to find this part of the explanation in the manual. Thank you. |
你这个是比较定制化的功能了,需要自己研究下了。简单的说就是官方的代码你自己 fork 过去自己改改。 This is a more customized function, so you need to study it yourself. To put it simply, you can fork the official code and modify it yourself. |
好的,回头了解一下。 Okay, let’s go back and find out. |
目前来看,这个 issue 应该和你做了 CDN 缓存有点关系。如果是你把接口做了 CDN 化的话。个人建议你增加下 postSave 的钩子,发布评论后调 CDN 的接口清空缓存,应该也可以的。 From the current point of view, this issue may have something to do with your CDN caching. If you convert the interface into a CDN. Personally, I suggest you add a postSave hook and adjust the CDN interface to clear the cache after posting a comment. It should also work. |
也不清楚具体什么情况,如果说是CDN缓存的话,那文章浏览次数统计应该也是会触发才是,但它又是正常的。就只是评论内容相关的接口有缓存现象,所以有点懵圈。 I don’t know what the specific situation is. If it is CDN caching, then the statistics of article views should also be triggered, but it is normal. It's just that the interface related to the comment content is cached, so I'm a bit confused. |
问题描述 | Describe the bug
在收到用户的评论后,访问管理后台是可以正常查看到评论信息,但在页面前端却不能正常显示。F12查看了后台waline请求路径,发现都是正常的200响应。
1.后台评论显示
2.评论插件显示
3.评论内容显示
问题网站 | Website URL
https://lisenhui.cn/tech/how-to-restart-wsl2.html
服务部署在哪里? | Where your waline deploy?
Vercel (Default)
数据存储在哪里?| Where your comment data store?
LeanCloud(https://leancloud.app)
Problem description | Describe the bug
After receiving the user's comments, the comment information can be viewed normally when accessing the management backend, but it cannot be displayed normally on the front end of the page. F12 checked the background waline request path and found that they were all normal 200 responses.
Backstage comment display
Comment plug-in display
Comment content display
Question Website | Website URL
https://lisenhui.cn/tech/how-to-restart-wsl2.html
Where is the service deployed? | Where your waline deploy?
Vercel (Default)
Where is the data stored? | Where your comment data store?
LeanCloud(https://leancloud.app)
The text was updated successfully, but these errors were encountered: