K2 Blog category view filter bug

GK User
Wed Apr 29, 2015 9:36 am
Hi,

I have detected a bug in the Blog category view that limits the tag filtering options when I was trying to configure the pagination option.

I'll try to explain it putting an example that you can easily generate.

The number of items show in a blog page is calculated as the sum of the Leading count, Primary count, Secondary count K2 category properties (by the way in the menu item the properties can by changes because the fields are disabled).

In my example, a blog page will show a maximum of 6 blog items.

The tags included in the Filter dropdown are only obtained from the 6 blog items selected to show in the page, not from the total published blog items.

So if a published article not shown in the page has a diferent tag, you can never get access to it through the filter only by pagination (if it is activated)

If you show the pagination you can see how the filter tags are calculated in every page.

Could you fix the bug?

Kind regards...Antonio
User avatar
Junior Boarder

GK User
Wed Apr 29, 2015 10:00 am
Sorry but I have to extend the bug to the pagination when you filter the blog items.

Another example to explain the bug.

Blog item page configured to show 6 items per page.
Total blog items published: 11
Total blog pages: 2 (pagination activated)
Item ordering: Recent first

Filter value: All (pagination works fine)

I select a tag value different than ALL (let's say that there are 4 published blog items with this tag, one are in the first page and 3 in the second page).
The bugs identified are the following:
  • Pagination after tag selection shows 2 pages instead of 1 (Should show 4 items in a 6 items page)
  • Tag selection in page 1: Shows only 1 item (the included in the ALL first page)
  • Tag selection in page 2: Shows only 3 items (the included in the ALL second page)
  • If you click in the pagination the tag filter selected is lost returning to ALL
I hope you can review the programming to fix these problems.

Kind regards...Antonio
User avatar
Junior Boarder

GK User
Wed Apr 29, 2015 10:06 am
Sorry again.

The tags included in the Filter dropdown bug is also in both portfolio categories.

Kind regards...Antonio
User avatar
Junior Boarder

teitbite
Fri May 01, 2015 11:31 am
Hi

Yes, I know this bug and had reported it to K2 already. Just to check if this bug is the one I'm thinking about. Please change template to the default joomla one and check if pagination is not showing all articles than as well.
User avatar
Moderator

GK User
Fri May 01, 2015 7:12 pm
Hi,

I have tested the bug in all the default joomla standard templates and no one implement the tag filter (the blog is shown as a normal paged view).

I have performed another test using the gkphoto template:

I am included to the blog view an instance of the K2 Tool module to show the Tag cloud of the blog category in the bottom1 position.

The tag cloud shows the same tags (all) in both pages and if you select a tag from the cloud, the pagination is recalculated and the first page is shown.

So I believe it is a wrong implementation of the tag filtering in the gkphoto k2 default template.

Kind regards...Antonio
User avatar
Junior Boarder

teitbite
Mon May 04, 2015 12:51 pm
Hi

Now I see what You have in mind. It's not a wrong implementation, those are 2 different things. Filter is still using the same page, all it does is to hide the elements not having the selected tag. We are not allowed to change K2 core files, just layout, so that was the best method available.

What You have tested is a good example how to override it. You just need a module capable of showing tags in dropdown list and it will work exactly as You wan it to.
User avatar
Moderator

GK User
Mon May 04, 2015 4:56 pm
Sorry but I disagree.

If your implementation is OK, you should warn in the template documentation that category views don't support pagination because they produce inconsistent results for the user

I think it is an important design shortcoming.

Kind regards...Antonio
User avatar
Junior Boarder

teitbite
Sat May 09, 2015 2:38 pm
Hi

Sorry for that. It was meant to show only articles related with the filter selector. I believe the idea was to set to show many articles per page to have lots of them to filter.
User avatar
Moderator


cron