aspose file tools*
The moose likes JForum and the fly likes User id confusion in new installation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "User id confusion in new installation" Watch "User id confusion in new installation" New topic
Author

User id confusion in new installation

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi,

I just finished my first jforum installation and it went fine. I'm running 2.1.8 under
tomcat 6 and postgresql.

However, in the first 10 minutes of playing around, I've run into some problems.
I'm wondering if I've hit bugs already or of this is an indication that something
is wrong with my installation.

I registered myself, created a topic and a post. But at some point things got
confused and my post shows up as being from Anonymous. The post has
my user name showing, but clicking the user name takes me to the Anonymous
user's "number of posts" page.

I'm concerned that I've hit some sort of data integrity problem right out of the box.

Anyone else seen anything like this? Any idea what's going on?

Thanks,

Fred

[originally posted on jforum.net by fptoth]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Postgres is a moving target when it come to creating repeatable SQL... they started with a lot of non-SQL standard stuff and are migrating towards the standard. However, this means that it's hard to have a single "install on any version and it work fine" script.

That said, I have a suspicion it's related to postgres's method of doing sequences (e.g. NEXTVAL). Does your jforum_user table show different user_id numbers for all the users?

Is the anonymous user's user_id=1? This is settable in the config file, but 1 is the default.

If it's zero, then either autosequencing isn't working or maybe it's starting at 0 instead of 1.
[originally posted on jforum.net by monroe]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Yes, there are 3 users in the table. Anonymous is 1, Admin is 2, and I'm 3.

It's the page display that's odd. See for yourself here:

http://www/iph-dev.ftoth.com/jforum/

Look at Test Forum. There are two topics listed with me "ftoth" as author.

But the underlying links are different. One goes to /usr/profile/1.page (anonymous)
and the other goes to /usr/profile/3.page (ftoth).

We use this instance of postgres on several other applications and I've always
found it to be rock-solid. Are you suggesting I'd be better off with mysql?

Thanks,

Fred




[originally posted on jforum.net by fptoth]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I took a long hard look at the tables and saw nothing that looked wrong.

I decided to restart tomcat and poof! All fixed. I'm not sure what happened
and I sure can't duplicate it at this point, but somehow jforum had cached
the wrong author name for a topic. Again, the underlying link was correct.
Just the name was wrong.

I'll keep an eye out for this again. One clue that might help track it down:

After bringing jforum up for the first time, I was playing around as anonymous,
then as admin, then as registered user, etc. At one point I noticed the banner
said "login" even though I thought I was already logged in. It was at that point
that I created a new topic and jforum saw me as somehow both anonymous
and as a registered user.

Thanks,

Fred

[originally posted on jforum.net by fptoth]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Turns out this is quite easy to duplicate:

1. Login as registered user.
2. Create a topic.
3. Logout.
4. Create a topic (as anonymous)

Jforum lists both topics as authored by the registered user.

Restart fixes it.

Note this bug appears to be limited to the above sequence
and requires the second topic to be created by anonymous.

Thanks,

Fred
[originally posted on jforum.net by fptoth]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: User id confusion in new installation
 
Similar Threads
Is there a way to enable capcha for every message post?
How to modify forum after it is created.
java.lang.reflect.InvocationTargetException error when trying to register new name
Installing MyEclipse in Ubuntu
Error when trying to change group permissions