Page 1 of 1

Newsletter : Division by zero in functions.admintabs.php

Posted: Wed Jan 10, 2007 7:53 pm
by philight
Hi,

i'm using this nice module "Newsletter Made Simple" and everything was ok, until this morning...

After several disconnection problems with the f.... hoster of my client (online.net REALLY bad!), i've no more users displayed (0 on 527) and i got this message :
Division by zero in functions.admintabs.php on line 650
I tried to fix this bug but I couldn't because I don't know from where this problem is coming...

Did somedone already experienced this kind of problem? Any ideas or solutions welcome.

Philight

Re: Newsletter : Division by zero in functions.admintabs.php

Posted: Wed Jan 10, 2007 10:40 pm
by calguy1000
This is weird, I didn't think there was any multiplication or division happening anywhere inside of NMS.  So I checked.  Line 650 of functions.admintabs.php is:

Code: Select all

    if (strlen($message) > 0){
I think something stupid is happening with your host.

Re: Newsletter : Division by zero in functions.admintabs.php

Posted: Wed Jan 10, 2007 10:43 pm
by calguy1000
I did a further check of every occurance of / in that file (and that was not fun).

Check the preferences in the admin tab.  and make sure the number of items per batch is greater than 0.  infact, make sure that nothing in the preferences is equal to 0 that should do the trick.

Re: Newsletter : Division by zero in functions.admintabs.php

Posted: Wed Jan 10, 2007 10:53 pm
by philight
calguy1000 wrote: Check the preferences in the admin tab.  and make sure the number of items per batch is greater than 0.  infact, make sure that nothing in the preferences is equal to 0 that should do the trick.
you were right, there was nothing in the preferences (blank) and i put 100 for the number of contacts per list and that works, thanks!!
What sould I write for items per batch?

Now I have an other serious problem : with a new message, I've a form error :

Code: Select all

DEBUG: templateid = -1
Form error
And i can't add any new message. I tried to manage it using a template, but i got this message :

Code: Select all

--Add Me - module:NMS string:error_problemwithmessage--
Unknown column 'templateid' in 'field list'

This bug happens since I update NMS from beta 1.0beta6 to 1.0.0, it was working before.

Thanks for your help, I spent all my noon on it... :-[

Added 1 hour later
I think it comes from the upgrading process :
http://dev.cmsmadesimple.org/tracker/index.php?func=detail&aid=1229&group_id=10&atid=117

Added the day after

I just followed the process (save datas, uninstall complete, install from scratch, import datas) explained by Roberto Braga on the link above and every thing seems to be ok now.