• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

new forum,topic notification

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
(jforum v2.1.6) In one of our forums we have 5 topics with 18 total messages (10 answers in one topic), and email notification for watching this forum has stopped working over the past 2 days.

this note,

https://coderanch.com/t/575988

describes a similar problem but only for a single topic...

I'll install from cvs.




[originally posted on jforum.net by ken0]
 
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
sometimes the total reported for forum messages (on category view) is =topics+answers, but sometimes it's not.

Anyone else notice this?
[originally posted on jforum.net by ken0]
 
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
We have this bug fixed already, in the CVS. Wait for the next version!

Rafael
[originally posted on jforum.net by Rafael Steil]
 
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
that's what I should do, but I may check out stable 2.1.6 source and attempt to make those recommended changes...I rolled this out 3 weeks ago and have about 60 users yea!

...unless there are more edits required than what marcinn mentions for this fix?

I checked out the cvs the night before last and noticed that the mis-ordered lines:

TopicsCommon.notifyUsers(t, topicDao);
t.setTotalReplies(t.getTotalReplies() + 1);

occurred in 2 places but fixed in only 1 in the PostAction file...not that I know it should have been done in the 2nd place too (can't understand java code, playing with fire, danger danger).

...waiting is certainly the best option for me, esp if the recommended edits from that other post are not complete.

Thanks for the support on this. I think it's a great app!
-ken
[originally posted on jforum.net by ken0]
 
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
I checked PostAction.java and TopicSpammer.java, and as far as I can tell, they're with the fixes.

If you think there is still something wrong, can you please point out, so I can fix it?

Thanks,
Rafael
[originally posted on jforum.net by Rafael Steil]
 
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
there were 2 problems:

1) Forum Watching / new topic notification was broken and I couldn't tell if the above bug fix would solve this. I wouldn't have thought that the forum watcher would get broken by what seems to be pagination;

2) in PostAction it appeared as tho the correction were only applied once even tho there were two instances of the reversal of those 2 lines. You can see here:

http://jforum.dev.java.net/source/browse/jforum/src/net/jforum/view/forum/PostAction.java?rev=1.145&view=auto&content-type=text/vnd.viewcvs-markup

if (!moderate) {
// Updates forum stats, cache and etc
if (!newTopic) {
TopicsCommon.notifyUsers(t, topicDao);
t.setTotalReplies(t.getTotalReplies() + 1);

that the 2 lines are still out of order. Somehow, my eclipse picked up that version. Yet, when I looked at my command-line copy (after cvs up -dP) I saw the lines were fixed.

I'm still mystified by this difference, but new to this checking out code thing. Can you explain why this happens?

I'm less interested in knowing the answer to my non-question #1 above since it now works(!)

thanks,
-ken
[originally posted on jforum.net by ken0]
 
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
newbie question:

I compiled the cvs code successfully, but only replaced the PostAction.class and TopicSpammer.class files in my production tomcat copy believing that replacing the whole jforum webapp outright with a newly compiled .war file might cause a problem somehow. Is that a good assumption?

Is a file-by-file (class files) replacement okay to do in this case since it was just a few line switches?

Also, I have tested that new topic notification works for new forums, however I don't think that those fixes will make the existing forums, where forum watching is/was broken, work again (not sure yet). Is there anything I can do in this case?

Thanks again for the support on a great app! -ken
[originally posted on jforum.net by ken0]
 
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
Yes, you can change only the .class files. However, you probably will need to change all .class files, to make sure you will not forget any dependencied.

Forum Notification should work for new and old forums, as long as you have the database tables there.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
reply
    Bookmark Topic Watch Topic
  • New Topic