• 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
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Forums not displaying for new users

 
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'm running JForum version 2.0.1.

For some reason, anyone that registers on my forum will not be able to see any of the forums. Its as if they don't have permissions, but they do. Everything is set to "Allow All". The only difference is that I am in the Administrators group and set to be an administrator and moderator. Any idea of what could be happening?
[originally posted on jforum.net by Anonymous]
 
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
Try this: even if the permissions are set to "Allow All", click "Save" (or Update), and see if it works.

Also, please remember that JForum puts all new users in the "General" group, and this group MUST have the id 1. To ensure that, run



and see if the group "General" has value "1" in the field "group_id".

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
Well that worked, why is that?

I checked the General group and it does have an id of 1, but it doesn't look like new users get put into the General group when they register.


[originally posted on jforum.net by Anonymous]
 
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
user-group association is in jforum_user_groups.

About the "why", it's an issue with how the permissions screen is created. So, after you add new things, is better to re-save permissions if the system is not showing what you expected to be shown.

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
Yes, I was looking in forum_user_groups, no entries are written when somebody registers.

Will I have to save the permissions every time a new user registers?
[originally posted on jforum.net by Anonymous]
 
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
No, you won't. They'll inherit permissions from group General.

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
I think I may have figured out my problem. I have it setup to use my site's login and I changed the way it registers a new user to the forum. Instead of using addNew(), I'm using addNewWithId(). Could it be not adding the user to the General group in that method? Should I add a call to addToGroup()?

I'm not sure if that will really work though, because I've tried just adding a new user to the General group through the admin screens and it still didn't use the group's permissions.
[originally posted on jforum.net by Anonymous]
 
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
Hmm, I tried that and it still didn't add a record into the forum_user_groups table. Well I'm going home now, I'll check for your reply in the morning.
[originally posted on jforum.net by Anonymous]
 
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
Still having this problem, really stumped about what to do.
[originally posted on jforum.net by Anonymous]
 
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
Started a new forum for another client, having the exact same problem. I'm just banging my head against the wall trying to figure this out.
[originally posted on jforum.net by mattcoz]
 
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
In the first message you said you were using version 2.0.1. Is this still true? latest version is 2.1.4.

Also, which database are you using?

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
Yes, using 2.0.1, and the database is MySQL.
[originally posted on jforum.net by mattcoz]
 
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
So, we've fixed a lot of bugs since 2.01. I'm almost sure this one you're getting was one of them.

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
I'll look into upgrading, thanks.
[originally posted on jforum.net by mattcoz]
 
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
Ok, I upgraded the forum to 2.1.4 and I'm getting the same problem. I registered a new user and no record is written to the jforum_user_groups table. The only change I made to the registration process was using the method addNewWithId instead of addNew. So I'm assuming that's where the problem is. I'm not sure where the code is for that method though, so I wasn't able to check if it was doing anything different.
[originally posted on jforum.net by mattcoz]
 
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
HHmm.. ok, now we have some possible bug. Where do you changed the all from addNew() to addNewWithId()?

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
net.jforum.view.forum.UserAction
insertSave()

Original:


Changed:


I get the userId, password, and email from my user database.
[originally posted on jforum.net by mattcoz]
 
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
So, the addNew() makes a call to



to set the group. You can call it by hand in your code, although JForum should be going this for your probably.

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 worked! Thanks!

I changed my code to this:



Tried registering a user and the jforum_user_groups record was written as expected.
[originally posted on jforum.net by mattcoz]
 
I’m tired of walking, and will rest for a minute and grow some wheels. This is the promise of this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic