Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined index: body_fail #2245

Closed
emanuele45 opened this issue Sep 22, 2015 · 5 comments
Closed

Undefined index: body_fail #2245

emanuele45 opened this issue Sep 22, 2015 · 5 comments
Milestone

Comments

@emanuele45
Copy link
Contributor

@Spuds that's for you... 馃槶

I was trying to test the bounce emails, so I took a gmail account I have, and added the configs to my localhost install of elk.
Then I enabled the mail queue.
I sent a PM to a member with a broken email.
Then I went to ?action=admin;area=mailqueue;sa=browse and clicked on "Send mail queue now".

The result is:


Notice: Undefined index: body_fail

    reduceMailQueue() in /.../Dialogo/sources/subs/Mail.subs.php at line 1390
    action_clear() in /.../Dialogo/sources/admin/ManageMail.controller.php at line 412
    dispatch() in /.../Dialogo/sources/subs/Action.class.php at line 182
    action_index() in /.../Dialogo/sources/admin/ManageMail.controller.php at line 92
    callMenu() in /.../Dialogo/sources/subs/Menu.subs.php at line 385
    action_index() in /.../Dialogo/sources/admin/Admin.controller.php at line 579
    dispatch() in /.../Dialogo/sources/SiteDispatcher.class.php at line 264
    elk_main() in /index.php_11 at line 237
    require_once() in /index.php_11 at line 166
    () in /index.php at line 23

Notice: Undefined index: body_fail in /.../Dialogo/sources/subs/Mail.subs.php on line 1390 Call Stack: 0.0001 254616 1. {main}() /home/emanuele/webserver/htdocs/beta_21/index.php:0 0.0005 312712 2. require_once('/home/emanuele/webserver/htdocs/beta_21/index.php_11') /home/emanuele/webserver/htdocs/beta_21/index.php:23 0.0242 3533632 3. elk_main() /home/emanuele/webserver/htdocs/beta_21/index.php_11:166 0.0420 4361656 4. Site_Dispatcher->dispatch() /home/emanuele/webserver/htdocs/beta_21/index.php_11:237 0.0453 4777632 5. Admin_Controller->action_index() /.../Dialogo/sources/SiteDispatcher.class.php:264 0.0540 5557616 6. callMenu() /.../Dialogo/sources/admin/Admin.controller.php:579 0.0546 5644432 7. ManageMail_Controller->action_index() /.../Dialogo/sources/subs/Menu.subs.php:385 0.0570 5805176 8. Action->dispatch() /.../Dialogo/sources/admin/ManageMail.controller.php:92 0.0571 5805576 9. ManageMail_Controller->action_clear() /.../Dialogo/sources/subs/Action.class.php:182 0.0592 6089888 10. reduceMailQueue() /.../Dialogo/sources/admin/ManageMail.controller.php:412
Error: The database value you're trying to insert does not exist: body(Mail.subs.php-1098)

    trigger_error() in /.../Dialogo/sources/database/Db-abstract.class.php at line 306
    error_backtrace() in /.../Dialogo/sources/database/Db-abstract.class.php at line 306
    replacement__callback() in /.../Dialogo/sources/database/Db-abstract.class.php at line 92
    preg_replace_callback()
    quote() in /.../Dialogo/sources/database/Db-abstract.class.php at line 191
    insert() in /.../Dialogo/sources/database/Db-mysql.class.php at line 720
    updateFailedQueue() in /.../Dialogo/sources/subs/Mail.subs.php at line 1098
    reduceMailQueue() in /.../Dialogo/sources/subs/Mail.subs.php at line 1404
    action_clear() in /.../Dialogo/sources/admin/ManageMail.controller.php at line 412
    dispatch() in /.../Dialogo/sources/subs/Action.class.php at line 182
    action_index() in /.../Dialogo/sources/admin/ManageMail.controller.php at line 92
    callMenu() in /.../Dialogo/sources/subs/Menu.subs.php at line 385
    action_index() in /.../Dialogo/sources/admin/Admin.controller.php at line 579
    dispatch() in /.../Dialogo/sources/SiteDispatcher.class.php at line 264
    elk_main() in /index.php_11 at line 237
    require_once() in /index.php_11 at line 166
    () in /index.php at line 23

The issue seems to be that 'body_fail' is set only at https://github.com/elkarte/Elkarte/blob/development/sources/subs/Mail.subs.php#L1364 so only when using send_mail and the mailing list is enabled.

What would you suggest for the fix? 馃懠

ETA: actually, 'body_fail' is used only in these two places (when it's set and when it's used) and is set to be equal to 'body'... can we just remove it and use 'body' instead?

@emanuele45 emanuele45 added this to the 1.1 Beta 1 milestone Sep 22, 2015
@emanuele45
Copy link
Contributor Author

@Spuds any opinion on that? 馃懠

@Spuds
Copy link
Contributor

Spuds commented Oct 6, 2015

Sorry, I promise to take a look as soon as I'm done breaking things with _req Plus I still need to fix beSocial and want to use the poor mans lightbox for the attachment zoom ... Argh ! Oh I think the search api should have standard topic remove, post remove, etc methods ... just seems tidy that way ... Argh to much stuff in my head !

@emanuele45
Copy link
Contributor Author

emanuele45 commented Oct 7, 2015 via email

emanuele45 added a commit to emanuele45/Dialogo that referenced this issue Oct 28, 2015
@emanuele45 emanuele45 modified the milestones: 1.1 beta 3, 1.1 Beta 1 Oct 29, 2015
@joshuaadickerson
Copy link
Contributor

That is a hard one to test for me, but does that commit fix the problem?

@Spuds Spuds modified the milestones: 1.0.7, 1.1 beta 3 Jan 21, 2016
@Spuds
Copy link
Contributor

Spuds commented Jan 21, 2016

Changed milestone to 1.0.7 as the error exists there when re adding a mail back to the queue after a sendmail failure.

Spuds added a commit to Spuds/Elkarte that referenced this issue Feb 10, 2016
@Spuds Spuds closed this as completed Feb 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants