walinejs / waline

💬 A Simple, Safe Comment System
https://waline.js.org/en/
GNU General Public License v2.0
2.11k stars 371 forks source link

[Bug]: 开启了reaction文章反应,但取不到表情计数,表情计数始终为0 || [Bug]: The reaction article response is enabled, but the expression count cannot be obtained, and the expression count is always 0 #2592

Open shmily101 opened 2 weeks ago

shmily101 commented 2 weeks ago

问题描述 | Describe the bug

我通过https://waline.js.org/guide/deploy/zeabur.html中所介绍的方法,在zeabur中部署了MongoDB和Docker服务,如下图:

截屏2024-06-13 17 33 51

我在客户端设置了reactiontrue,它也正常在网页中展示了,当我点击一个表情后,发送了如下请求:

截屏2024-06-13 17 38 16 截屏2024-06-13 17 38 21 截屏2024-06-13 17 38 27

按照该请求的响应来看,reaction2的点击次数应该是2,但此时网页上只有我刚刚点击的一次。当我刷新页面后,网页中文章反应所有的表情计数都为0了,此时接口获取到的数据也都是0,如图:

截屏2024-06-13 17 48 27 截屏2024-06-13 17 48 32 截屏2024-06-13 17 48 36

我在数据库中查看了,MongoDB数据库中的数据没有问题。reaction2的点击次数是2,想知道为什么接口获取到的数据会是0呢?

b79b992a-569c-4e4c-bcce-d90d382ca20f_capture

问题网站 | Website URL

https://shmily101.github.io/post/20240612-JS%E5%BC%95%E6%93%8E(%E4%BA%8C):%E6%8E%A2%E7%B4%A2V8%E7%BC%96%E8%AF%91%E6%B5%81%E6%B0%B4%E7%BA%BF

服务部署在哪里? | Where your waline deploy?

Zeabur

数据存储在哪里?| Where your comment data store?

MongoDB


Problem description | Describe the bug

I deployed in zeabur through the method introduced in https://waline.js.org/guide/deploy/zeabur.html MongoDB and Docker services, as shown below:

Screenshot 2024-06-13 17 33 51

I set reaction to true on the client, and it was displayed on the web page normally. When I clicked an emoticon, the following request was sent:

Screenshot 2024-06-13 17 38 16 Screenshot 2024-06-13 17 38 21 Screenshot 2024-06-13 17 38 27

According to the response of the request, the number of clicks on reaction2 should be 2, but at this time there is only one click on the web page that I just clicked. When I refresh the page, all expression counts reflected in the article on the webpage are 0, and the data obtained by the interface are also 0, as shown in the figure:

Screenshot 2024-06-13 17 48 27 Screenshot 2024-06-13 17 48 32 Screenshot 2024-06-13 17 48 36

I checked in the database and there is no problem with the data in the MongoDB database. The number of clicks of reaction2 is 2. I want to know why the data obtained by the interface is 0?

b79b992a-569c-4e4c-bcce-d90d382ca20f_capture

Question Website | Website URL

https://shmily101.github.io/post/20240612-JS%E5%BC%95%E6%93%8E(%E4%BA%8C):%E6%8E%A2%E7%B4%A2V8%E7 %BC%96%E8%AF%91%E6%B5%81%E6%B0%B4%E7%BA%BF

Where is the service deployed? | Where your waline deploy?

Zeabur

Where is the data stored? | Where your comment data store?

MongoDB

lizheming commented 2 weeks ago

感觉可能和中文 url 有关系,path 字段指定一个英文的唯一字串试试呢?


I feel it may have something to do with the Chinese URL. How about specifying a unique English string in the path field?