Author |
Message |
Nomad
Client

Joined: Jan 21, 2006
Posts: 87
Location: Arizona
|
Posted:
Thu Jul 27, 2006 12:34 pm |
|
I was tinkering with WS subscriptions adding to groups,
when all of a sudden, when I went to check my nsn groups, i got this error
Warning: Division by zero in /home/mysite/public_html/includes/nsngr_func.php on line 140 .....it reports no groups in database, or users, but that is not true.
My last action was to use ws subscriptions to set up a trial subscription to a group. This worked, the member was added. When I went into nsn groups to remove the user from the group, i couldnt access it, and got that error.
Now, when I check the function, I get this line:
$pagesint = ($totalselected / $perpage);
any hints.....where is the $perpage defined? or what could have went wrong?
is there a database table that i need to check or reset? |
_________________ Nomad!~!
Last edited by Nomad on Thu Jul 27, 2006 7:08 pm; edited 1 time in total |
|
|
 |
hitwalker
Sells PC To Pay For Divorce

Joined:
Posts: 5661
|
Posted:
Thu Jul 27, 2006 1:43 pm |
|
|
|
 |
kguske
Site Admin

Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Thu Jul 27, 2006 1:45 pm |
|
$perpage appears to be a configuration option for the NSN Groups module. |
_________________ I search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
 |
Nomad

|
Posted:
Thu Jul 27, 2006 7:07 pm |
|
Thanks guys. Here is what I found:
I read the post Hitwalker gave me and I try the suggested fix. I put a @ in front of ($totalselected / $perpage) so that it reads $pagesint = @($totalselected / $perpage). This got rid of the division by zero error, but nsn groups wouldnt let me view groups or view users. It said that there wasnt any in the database.
Next I checked the configuration options as suggested by kguske. Here I was able to fix the problem, and duplicate the problem.
There are 3 options in the NSN Groups configuration menu. If you change the Send Expiring Notice without setting the # items in lists field (i.e. leave it blank & dont touch it) then you get this error. To fix the error, you have to just go back and choose an option for # items in lists.
I think you need to mark this as a bug. See if you can duplicate the problem
Thank you guys for you help...I feel enlightened  |
|
|
|
 |
kguske

|
Posted:
Thu Jul 27, 2006 7:11 pm |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Fri Jul 28, 2006 7:02 am |
|
Quote: |
I think you need to mark this as a bug. See if you can duplicate the problem
|
I have captured this as a potential bug. Given where we are at in the release cycle, it may not get reviewed for RavenNuke 2.10.00. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
montego

|
Posted:
Sat Jul 29, 2006 6:37 pm |
|
I just fixed this in 2.10.00. Turns out, under admin/modules/nsngroups, find within the files all references to the array $gr_config and change it to $grconfig.
I believe what may have happened is when you save the config and then come back into it, you will not see your previously saved values. If you accidentally save at this point, without changing the values on the page, the row limit gets to be zero. |
|
|
|
 |
kguske

|
Posted:
Sat Jul 29, 2006 6:41 pm |
|
The needle in the haystack, so to speak. Well done, montego! |
|
|
|
 |
Nomad

|
Posted:
Sun Jul 30, 2006 1:18 am |
|
It works perfect now. You The Man! |
|
|
|
 |
leo51
Worker


Joined: Sep 09, 2004
Posts: 106
Location: Canada
|
Posted:
Thu Aug 03, 2006 9:22 pm |
|
montego wrote: | I just fixed this in 2.10.00. Turns out, under admin/modules/nsngroups, find within the files all references to the array $gr_config and change it to $grconfig. |
Thanks for this fix. End up on this thread because I was told by "kguske" to do a search for division by zero erro. However, could you please guide me how exactly do I set the Date Display Format: I am not too familar with these things: as this ('l dS \of F Y h:i:s A') or l dS \of F Y h:i:s A
I found this "// Prints something like: Monday 15th of August 2005 03:12:46 PM
echo date('l dS \of F Y h:i:s A');" and would be able to do it in a page but not sure how to do it in this case. |
|
|
|
 |
gregexp
The Mouse Is Extension Of Arm

Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol
|
Posted:
Fri Aug 04, 2006 11:56 pm |
|
Im a little confused as to exactly your question.
If youd like to change the format throughout the site, Its a language edit, other then that, I think a more specific approach may be helpfull. |
_________________ For those who stand shall NEVER fall and those who fall shall RISE once more!! |
|
 |
 |
montego

|
Posted:
Sat Aug 05, 2006 9:05 am |
|
|
|
 |
|