• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

admin userlist search bug

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
reply
    Bookmark Topic Watch Topic
  • New Topic