Ticket #1243 (closed defect: fixed)

Opened 5 days ago

Last modified 4 days ago

adding mail aborts

Reported by: anonymous Assigned to:
Priority: major Milestone: ispCP ω 1.0.0 - RC5
Component: Frontend (GUI) Version: ispCP ω 1.0.0 - RC4
Severity: Don't know Keywords:
Cc:

Description

Adding mail-account with the script client/add_mail_acc.php aborts with the following messages:

 Notice: Undefined index: mail_type_forward in /var/www/ispcp/gui/client/add_mail_acc.php on line 69
 
 Notice: Undefined index: mail_type in /var/www/ispcp/gui/client/add_mail_acc.php on line 372
 
 Notice: Undefined index: mail_type in /var/www/ispcp/gui/client/add_mail_acc.php on line 382
 
 Notice: Undefined index: mail_type in /var/www/ispcp/gui/client/add_mail_acc.php on line 409
 
 Notice: Undefined index: mail_type_forward in /var/www/ispcp/gui/client/add_mail_acc.php on line 272

 ...

 Unknown column 'mail_auto_respond_text' in 'field list' 

Hints: In the HTML-form is no POST-variable mail_type.

Attachments

mail.patch (2.4 kB) - added by Cube on 05/12/2008 12:59:19 AM.
mail2.patch (2.5 kB) - added by Cube on 05/12/2008 01:24:37 PM.
Here's the new patch. That was me in the former post.
at-least-one.patch (0.7 kB) - added by Cube on 05/12/2008 09:20:16 PM.
This patch is to fix the problems when unchecking both (new language variable)

Change History

05/11/2008 05:01:14 PM changed by anonymous

Hint #2: If you leave the checkbox "Forward mail" unselected you will get the following 2 messages (also see above)

Notice: Undefined index: mail_type_forward in /var/www/ispcp/gui/client/add_mail_acc.php on line 69
...
Notice: Undefined index: mail_type_forward in /var/www/ispcp/gui/client/add_mail_acc.php on line 272

05/11/2008 05:18:30 PM changed by rats

  • milestone changed from Working to ispCP ω 1.0.0 - RC5.

05/12/2008 12:58:55 AM changed by Cube

I'll attach a patch for this.
I could not reproduce "Unknown column 'mail_auto_respond_text' in 'field list"

Because with this error the entered data was not checked it was possible not to enter a password, which caused a "unknown error". Perhaps this caused the error in ticket #1245.

05/12/2008 12:59:19 AM changed by Cube

  • attachment mail.patch added.

(follow-up: ↓ 5 ) 05/12/2008 03:13:51 AM changed by anonymous

The attached patch works for the reported "Notice: Undefined index"'es. But if you unselect "Normal mail" and select "Forward mail" with a valid e-mail-address you still get the following strict notice:

Notice: Undefined index: mail_type_normal in /var/www/ispcp/gui/client/add_mail_acc.php on line 227

The main bug with the following error message:

Unknown column 'mail_auto_respond_text' in 'field list' 

is still present. It appears if you unselect "Normal mail" and "Forward mail" at the same time. It also appears if you create a valid account or a valid forward. I'll look for this special problem tomorrow, maybe there is also something wrong with my config.

If you unselect both ("Normal Mail" and "Forward Mail") you get the following notices:

 Notice: Undefined variable: mail_pass in /var/www/ispcp/gui/client/add_mail_acc.php on line 354
 
 Notice: Undefined variable: mail_forward in /var/www/ispcp/gui/client/add_mail_acc.php on line 355
 
 Notice: Undefined variable: mail_type in /var/www/ispcp/gui/client/add_mail_acc.php on line 357
 
 Notice: Undefined variable: sub_id in /var/www/ispcp/gui/client/add_mail_acc.php on line 358

Of course there shouldn't be the option to unselect both. Maybe this is one part of the problem what #1245 complains about.

(in reply to: ↑ 4 ) 05/12/2008 01:19:52 PM changed by anonymous

Replying to anonymous:

Notice: Undefined index: mail_type_normal in /var/www/ispcp/gui/client/add_mail_acc.php on line 227



You're right, a will attach a new patch.

The main bug with the following error message: {{{ Unknown column 'mail_auto_respond_text' in 'field list' }}} is still present. It appears if you unselect "Normal mail" and "Forward mail" at the same time. It also appears if you create a valid account or a valid forward. I'll look for this special problem tomorrow, maybe there is also something wrong with my config.



I can not reproduce it. Did you the database update in the admin-GUI? Is there the column "mail_auto_respond_text" in your DB?

If you unselect both ("Normal Mail" and "Forward Mail") you get the following notices:



Can not reproduce as well. When I unselect both, I get the message that the new account will be added and finally nothing is added. Not the nicest behavior, but there are no errors or notices.

05/12/2008 01:24:37 PM changed by Cube

  • attachment mail2.patch added.

Here's the new patch. That was me in the former post.

(follow-up: ↓ 11 ) 05/12/2008 05:54:22 PM changed by anonymous

The second patch fixed the message with:

Notice: Undefined index: mail_type_normal in /var/www/ispcp/gui/client/add_mail_acc.php on line 227

There is still the other (third) bug with the undefinded index notices. It appears only if you enter a valid username in client/add_mail_acc.php but you have to leave the checkboxes ("Normal Mail" and "Forward Mail") unselected. It is unimportant if you have a valid "password" a a valid "forward to". Maybe there is a PHP/HTML-Redirect which jumps over these notices.

 Notice: Undefined variable: rs in /var/www/ispcp/gui/client/add_mail_acc.php on line 330
 
 Notice: Trying to get property of non-object in /var/www/ispcp/gui/client/add_mail_acc.php on line 330
 
 Notice: Undefined variable: mail_pass in /var/www/ispcp/gui/client/add_mail_acc.php on line 354
 
 Notice: Undefined variable: mail_forward in /var/www/ispcp/gui/client/add_mail_acc.php on line 355
 
 Notice: Undefined variable: mail_type in /var/www/ispcp/gui/client/add_mail_acc.php on line 357
 
 Notice: Undefined variable: sub_id in /var/www/ispcp/gui/client/add_mail_acc.php on line 358

P.S.: Yes I've made the database update in the admin-GUI. But I cannot 100% verify if it updated correctly, so please tell me where I can find this mail_auto_respond_text? Do you mean the field mail_auto_respond (from type text) in mail_users?

P.S.: I'm still trying to find the reason for the main bug:

 Unknown column 'mail_auto_respond_text' in 'field list'

For now I have no idea why this happens, do you know any critical configs/setting which could force this error?

05/12/2008 06:17:16 PM changed by rats

  • status changed from new to closed.
  • resolution set to fixed.

fixed in r1147

05/12/2008 06:27:16 PM changed by anonymous

  • status changed from closed to reopened.
  • resolution deleted.

Could you please also apply the changed part of the second patch "mail2.patch"? In commit r1147 it seems to be missing. And please consider my comment from 05/12/2008 05:54:22 PM, there is another round of Undefined variable notices.

05/12/2008 06:31:18 PM changed by anonymous

I have to correct, that the second patch mail2.patch was really commited to trunk. But the sthurd round of notices weren't fixed.

05/12/2008 06:45:04 PM changed by anonymous

Now I know the reason why I sadly said that mail2.patch wasn't commited. Cause currently there is the following notice left open:

Notice: Undefined index: mail_type_forward in /var/www/ispcp/gui/client/add_mail_acc.php on line 272

It was already fixed in the first patch mail.patch, but it seems to be missing in r1147. It appears if you try to create a valid normal mail account.

(in reply to: ↑ 6 ) 05/12/2008 09:06:06 PM changed by Cube

This ticket is getting complicated because we're discussing here many independent things.

The undefined index on line 272 is really still there because RatS forgot to apply a part of the patch (it's in both patches).

P.S.: Yes I've made the database update in the admin-GUI. But I cannot 100% verify if it updated correctly, so please tell me where I can find this mail_auto_respond_text? Do you mean the field mail_auto_respond (from type text) in mail_users?

No, I mean the field mail_auto_respond_text of type text in mail_users. mail_auto_respond should be of type tinyint. It seems your database update was not correct/successful.

The notices when unchecking both are really there, but only visible in the log. There is also an database entry with many NULLs.

05/12/2008 09:20:16 PM changed by Cube

  • attachment at-least-one.patch added.

This patch is to fix the problems when unchecking both (new language variable)

05/12/2008 11:11:24 PM changed by rats

  • status changed from reopened to closed.
  • resolution set to fixed.

sorry for that, it was not my patch, was bei Thomas Wacker; I've added the missing isset() and the "at-least-one" and hope we can close these tickets forever :) (r1150)


Add/Change #1243 (adding mail aborts)




Action