練功房推薦書單

  • Google!Android 3手機應用程式設計入門(第四版)
  • 賈伯斯傳(軟皮精裝版)
  • 猛虎出閘制霸版:最新OCP Java SE 6 Programmer專業認證(附原始程式碼及範例檔)
  • SCWCD 5 猛虎出閘:Java Web 應用程式專業認證
Possible bug in the forums  XML
Forum Index » JForum中文社群 JForum Chinese Users Community
Author Message
acer123

九級學員

Joined: 2009-09-10 14:45:53
Messages: 19
Offline

I cannot find any jira site for the forums where i can post the possible bugs which i have found and been trying to fix recently. andwoson site looks pretty good and active also which is still suporting for JForums. I will also post my bugs and the fix i did so other people might find useful. One of them which i encountered lately is with the pagination:-

1) Go to Admin Control Panel
2) In page1 click on any user Edit link. Just click on submit when you are in edit page or try to edit any kind of information like firstname, lastname, etc for the user. Once clicked submit it will redirect you to the user listing page under admin control panel
3) Now click on page 2 and you will see the exception .

The problem is when you get returned from editing the user information jforums shows the next page link as :-

http://localhost:8080/jforums/adminUsers/editSave/30.page (This link throws an exception as there is nothing defined in urlpattern for editSave)

where originally it is suppose to show :-

http://localhost:8080/jforums/adminUsers/list/30.page

Any clue if this has to do something with the pagination.ftl ? or if you have encountered this issue ?
acer123

九級學員

Joined: 2009-09-10 14:45:53
Messages: 19
Offline

Ok i found the solution. Hope this is helpful for everyone. in UserAction.java under commonData() add :-

this.context.put("action","list");

And then change the bottom line in user_list.htm :-

<table width="100%">
<tr>
<td align="right"><#if thisPage?exists><@pagination.doPagination action/></#if></td>
</tr>
</table>

That's it. As commonData() is always called for any kind of action in UserAction.java whether you edit a user or edit a group. So now we know that action will always be list whenever it goes in commonData(). I don't know why a user when edited through the Admin page and click submit it always have the last action of editSave(). so when you click on the second page hence you get the exception. When the page refreshes everything works fine.

Hope this helps other people.

This message was edited 1 time. Last update was at 2009-11-28 10:21:43

andowson

六段學員
[Avatar]

Joined: 2007-01-02 22:20:40
Messages: 652
Location: 台北
Offline

Thank you, acer123. This is a bug. In my site, when click the second page the exception is not shown, but the page will be redirected to the home page.
I maintained a bug fix project for JForum2. You can report the bug here:
http://code.google.com/p/jforum2/issues/list

This message was edited 2 times. Last update was at 2011-09-27 09:39:46


分享經驗 累積智慧
[WWW] [MSN]
acer123

九級學員

Joined: 2009-09-10 14:45:53
Messages: 19
Offline

Thanks man. I will sure do that. The more I play around with it the more I get issues and the more I fix it with your help also smilie. Hope to continue support and report bugs and their fixes also.

This message was edited 1 time. Last update was at 2009-11-28 10:22:51

 
Forum Index » JForum中文社群 JForum Chinese Users Community
Go to: