This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "admin userlist search bug" Watch "admin userlist search bug" New topic
Author

admin userlist search bug

Migrated From Jforum.net
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 jforum.net by mosu]
Migrated From Jforum.net
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:
1
Second page has a link of:
2
Both links work OK.

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

current page is 3

In admin /forum/adminUsers/groupSearch/6.page 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:
1
this one works.

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

Someone, a better fix?

[originally posted on jforum.net by mosu]
Migrated From Jforum.net
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/UserAction.java 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 urlPattern.properties:
# 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 jforum.net by andowson]
 
Consider Paul's rocket mass heater.
 
subject: admin userlist search bug
 
Similar Threads
Can you read this?
Is Null, Not an Object, or Not Defined
dojo loading FilteringTable problem
dojo loading FilteringTable problem
How to correctly invoke the doPagination FreeMaker macro