XF 2.2 Download / view counter not working

Seeker-Smith

Well-known member
I've noticed that when videos are posted to a forum the counter is not recording views /downloads.
 
Last edited:
That video is a standard attachment, and it isn't embedded in a player inside the post so the view count will only increment if you physically download the file.

But we also don't update view counters immediately - this is true across most areas of the software for different counters. View counts are tracked and then updated in one go periodically via cron entry.
 
Actually, there is another caveat here and potentially one that may eventually lead to no view counters on attachments (or at least for some types).

As of right now, video and audio attachments are served directly by the web server, rather than going through our PHP script. This is mostly for efficiency due to the way browsers make requests to these types of content. Thus, since the standard attachment viewing code is being bypassed, the view count won't be incremented. Overall, I think we'd consider that mostly as designed/expected for technical/efficiency reasons, with a likelihood that in the future, more attachment types (such as images) will be served in a similar way.
 
Actually, there is another caveat here and potentially one that may eventually lead to no view counters on attachments (or at least for some types).

As of right now, video and audio attachments are served directly by the web server, rather than going through our PHP script. This is mostly for efficiency due to the way browsers make requests to these types of content. Thus, since the standard attachment viewing code is being bypassed, the view count won't be incremented. Overall, I think we'd consider that mostly as designed/expected for technical/efficiency reasons, with a likelihood that in the future, more attachment types (such as images) will be served in a similar way.

Hello, I have a question, so how do I allow clicking on the video attachment to download it?

I ask because when I click it is not downloaded, but another window opens playing the video or audio and the visit does not count.

Imagen1.webp
 
That is typical behaviour for content that can be displayed inline, images too.

You can either right click and save, or once the video is open you should be able to download it through the menu on the video player (may depend on browser compatibility).
 
Back
Top Bottom