Meaningless Drivel is fun!
The moose likes JForum and the fly likes admin userlist search bug Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "admin userlist search bug" Watch "admin userlist search bug" New topic

admin userlist search bug

Migrated From
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
In admin, in userlist you can search by username or filter by usergroup.

In template file there is a single <form> that set module and action.
Action is for both 'search'

Filtering by usergroup gives you a first page but links in the pager don't work since action for group filtering should have been 'groupSearch'.

To fix that, one should eighter put a javascript on submit to change action acordingly or split into 2 forum, each containig submit button and proper hidden fild (search and respectively groupSearch).

Since there is no more JIRA, will this bug reports be lost?
Will there be any future releases on 2.1.x version? 3.0 is still far away.

One question:
investigating this bug, I noticed that on first page link (in pagination) was different than the rest. (current page being 2 or 3), and did not worked.

<#if (start > 0)>/${start}</#if>
when I changed to <#if (start >= 0)>/${start}</#if> it worked...

what do you think?
[originally posted on by mosu]
Migrated From
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Below some sample links for the second bug I'm talking about in previous post (links redered by pagination.ftl, for first page generate errors in admin user list):

Here is listing of a thread with several posts. First link looks like:
Second page has a link of:
Both links work OK.

But in admin/userlist > filter by group:
first page has a link as:
second :

current page is 3

In admin /forum/adminUsers/groupSearch/ does not work, HTTP Status 404 - is returned.
putting in pagination.flt a >=0 instead of =0 like:
<#if (start >= 0)>/${start}</#if>
will generate a link for the first page as:
this one works.

Also topic lists generate an extra /0/ and works OK.

Someone, a better fix?

[originally posted on by mosu]
Migrated From
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
It is a bug in JForum 2.1.8. I don't think it's a good idea to modify pagination.ftl. Since it was used in many places in JForum pagination.
The fix I used is as follows:
1. Change the search() and groupSearch() methods in net/jforum/admin/ as follows:

* change the parameter name group to group_id in search()
* add this.context.put("action", "groupSearch"); to groupSearch()

2.Add a new key to
# Admin Users
adminUsers.list.0 =
adminUsers.list.1 = start
adminUsers.groupSearch.1 = group_id
adminUsers.groupSearch.2 = start, group_id
adminUsers.pendingActivations.0 =
[originally posted on by andowson]
I agree. Here's the link:
subject: admin userlist search bug
It's not a secret anymore!