elsantodel90
(Agustín Santiago Gutiérrez)
22 أكتوبر 2017، 12:50ص
1
This happens after updating to v1.9.0.beta13 +63
Steps to reproduce:
Create a post with attachments.
Let some users download them, so that the counters go up.
Edit the post, for example adding a single text line at the end.
After this, counters are back to zero.
إعجابَين (2)
Does this persist after you refresh the page by pressing f5 in your browser or the refresh button?
elsantodel90
(Agustín Santiago Gutiérrez)
22 أكتوبر 2017، 1:28ص
3
Yes, it does.
Also using different browsers (chrome and firefox) show the same numbers, which go back to zero for attachments if the reply is edited.
Ok @zogstrip can you take a look next week and see what you think?
elsantodel90
(Agustín Santiago Gutiérrez)
1 يونيو 2018، 1:51ص
10
I have just updated to
v2.1.0.beta1 +1
The “link click counter” bug for file attachments still remains exactly the same as described.
Let’s see
test-text-file.txt (9 Bytes)
I just made an edit to this post, here’s what it looked like before my edit:
Yep confirmed that resets the count for some reason…
7 إعجابات
zogstrip
(Régis Hanol)
9 يوليو 2018، 8:29ص
12
This is not as easy as I’d hoped but it’s still on my list. Will get it fixed by the end of the week.
3 إعجابات
zogstrip
(Régis Hanol)
3 أغسطس 2018، 11:37م
13
So the issue is that we extract links from post several times during the cooking and post cooking process. Since they also change from relative/bare to absolute/cdn in the same process, we’re effectively deleting the links to recreate them later on. Thus losing the clicks count.
I’ve pushed a fix to ensure we always store links to uploads using the URL we keep in the database.
https://github.com/discourse/discourse/commit/bf4d98e89d91df4b35bd2c1cc2c17630dbc0f3c3
إعجابَين (2)
Sounds good but I am a bit unclear. Will this fix all posts or just new posts?
It is OK if it is new posts only, I’m just asking.
zogstrip
(Régis Hanol)
3 أغسطس 2018، 11:43م
15
Old posts will require a rebake (and a click count loss), new posts will be .
3 إعجابات
I rebaked the post above and it doesn’t seem to be working. Let me try a new attachment.
Can everyone reading this please click ↓ ↓
another-test-file.txt (19 Bytes)
Post edited, October 3rd 2018!
5 إعجابات
zogstrip
(Régis Hanol)
14 أغسطس 2018، 10:25ص
17
Turns out, I also needed to take into account CDN so I extracted the cook_url
method from the CookedPostProcessor
and used it so we store the same links as the one we cook in the posts
https://github.com/discourse/discourse/commit/de92913bf4761939ed5d8162db8337ffc7c8a00b
5 إعجابات
zogstrip
(Régis Hanol)
تم إغلاقه في
14 أغسطس 2018، 4:00م
18
This topic was automatically closed after 2 hours. New replies are no longer allowed.