- Posts: 23
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- K2 Content Module - Time range not working as expected.
K2 Content Module - Time range not working as expected.
- Tyler Ancell
-
Topic Author
- Offline
- Junior Member
I'm having a bit of trouble getting the K2 content module to work in the way I'm assuming it should work.
My current settings are as follows:
Source: Retrieve Items from Categories
Select Categories: I've selected the categories I want to pull items from
Fetch items from children: Yes
Item Count: 8
Item Ordering: Most popular
Time Range: 1 week
What I expect to happen, is that K2 displays the most popular (most viewed) items over the past week. Setting it to 1 week displays nothing, 2 weeks displays nothing, 1 month shows one item, 3 months shows eight items.
I have many items on my site that are viewed many times daily by many people, yet articles still do not display under the most popular setting.
Ideally I'd like to have this set to 1 or 2 days.
What can I do to fix this?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- User
Which version of Joomla! and K2 are you using?
Are you using overrides for that module?
Please Log in or Create an account to join the conversation.
- Tyler Ancell
-
Topic Author
- Offline
- Junior Member
- Posts: 23
I am using a module override, but I've have not changed any php, I've only changed the html to make use of bootstrap.
Edit: The K2 Content module that I used to make my override was from the 2.6.9 package as well.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- User
Please Log in or Create an account to join the conversation.
- Tyler Ancell
-
Topic Author
- Offline
- Junior Member
- Posts: 23
When caching is enabled, I use conservative caching, and I've disabled caching for the k2 content module.
Edit: Hits are being stored in the database, yes - sorry, forgot to add that.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- User
Can you do a test for me please?
Can you disable the site's cache and navigate to some K2 items?
Please Log in or Create an account to join the conversation.
- Tyler Ancell
-
Topic Author
- Offline
- Junior Member
- Posts: 23
Set the module to 1 day, and nothing shows after visiting 5 different articles, 5 times each. K2 is counting the hits in the database in the backend.
Please Log in or Create an account to join the conversation.
- Tyler Ancell
-
Topic Author
- Offline
- Junior Member
- Posts: 23
Please Log in or Create an account to join the conversation.
- Tyler Ancell
-
Topic Author
- Offline
- Junior Member
- Posts: 23
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- User
Please Log in or Create an account to join the conversation.
- Tyler Ancell
-
Topic Author
- Offline
- Junior Member
- Posts: 23
Please Log in or Create an account to join the conversation.
- Tyler Ancell
-
Topic Author
- Offline
- Junior Member
- Posts: 23
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- User
Is your server located behind or using a proxy?
Please Log in or Create an account to join the conversation.
- Tyler Ancell
-
Topic Author
- Offline
- Junior Member
- Posts: 23
Please Log in or Create an account to join the conversation.
- Tyler Ancell
-
Topic Author
- Offline
- Junior Member
- Posts: 23
Please Log in or Create an account to join the conversation.
- Tyler Ancell
-
Topic Author
- Offline
- Junior Member
- Posts: 23
1 day, 3 days, and 1 week show nothing
2 weeks shows one item
1 month shows two items
3 month shows eight items
Please Log in or Create an account to join the conversation.
- Lefteris
-
- User
The time range filter is applied on the items creation date not on the item hits. So setting this to 1 week for example will first fetch the last week's items ( if any ) and then sort them by the hits counter.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- User
Keep in mind that if no items have been inserted in the past x period, no items will be shown. Most popular items within a week, means that the module will fetch the most popular items that were created within the past week.
Please Log in or Create an account to join the conversation.
- Tyler Ancell
-
Topic Author
- Offline
- Junior Member
- Posts: 23
What I thought to be the case, was that the time range would show the most popular items over that time range. Like a "whats trending" sort of thing.
Something like this:
www.joomlahill.com/demos/5-recently-hit-articles
or
extensions.joomla.org/extensions/extension/news-display/popular-content/most-popular-content-by-date-range
(This one looks fairly simple, but my php skills are probably insufficient to rewrite this to work with K2 items rather than Joomla articles)
Would there be a way to duplicate and override the K2 content module and make it so it displays the most popular items within a specific time range, regardless of when the items were created?
Also, thank you for all your help so far, it's definitely appreciated!
Please Log in or Create an account to join the conversation.
- Lefteris
-
- User
No, that's not so easy. In order to have trending items the way you want you need to track the time each item is hit. This is not done by K2, so this means that you need a third-party extension for that.
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- K2 Content Module - Time range not working as expected.