?
Referenced as Pull Request for: # 11895
avatar slibbe
slibbe
2 Sep 2016

Steps to reproduce the issue

Install Joomla! 3.6.2 from the download at https://github.com/joomla/joomla-cms/releases/tag/3.6.2

Make sure that at the Finalisation-screen after Overview, send Email Configuration is set to yes, as shown in attachment.

Expected result

Installation succes should be independant of the setting send Email Configuration option.

Actual result

No matter which of the install-options you choose you will be getting this same Finalisation-screen until you set the send Email Configurations to No.

System information (as much as possible)

PHP 5.6, MySQLi, Apache, all running in a Vagrant ScotchBox.screen shot 2016-09-02 at 10 03 09

Additional comments

avatar slibbe slibbe - open - 2 Sep 2016
avatar zero-24
zero-24 - comment - 2 Sep 2016

@slibbe works for me can you doube check that the PHP mail() function is enabled on your server?

avatar mbabker
mbabker - comment - 2 Sep 2016

The whole point of the issue is installation shouldn't catastrophically fail just because the welcome email couldn't be sent.

avatar zero-24
zero-24 - comment - 2 Sep 2016

ok i could it reproduce but i have no idea how to fix.

To reproduce just add $return = false; here: https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/mail/mail.php#L133

@mbabker do you know how to catch that? If that hits the return it fails and it look i have not the right tools to debug what happen there :(.

https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/mail/mail.php#L136

avatar mbabker
mbabker - comment - 2 Sep 2016

The mailer API correctly raises an error on a send failure. That shouldn't change. The install app needs to not fail on that error condition.

avatar zero-24
zero-24 - comment - 2 Sep 2016

The install app needs to not fail on that error condition.

Yes i agree with that. But how we can catch that error? Currently we catch (Exception $e) which is wrong? Atleast it don't work as after the first failed call to the $mailer->send() it jumps back.

https://github.com/joomla/joomla-cms/blob/staging/installation/controller/install/email.php#L130-L142

If you comment the call to $mailer->send() out everything works. (ok no mail is send than :P)

avatar zero-24 zero-24 - change - 2 Sep 2016
Status New Confirmed
avatar mbabker
mbabker - comment - 2 Sep 2016

The fix is simple. The libraries/legacy tree isn't being included in the install app because its code was rewritten to not be dependent on it. Most likely this has been an issue since the PR that removed the "if JError exists use it for error handling else throw an Exception" logic from JMail. The error handling is trying to call a non-existing class.

Change installation/application/framework.php to require import.legacy.php instead of import.php.

avatar zero-24
zero-24 - comment - 2 Sep 2016

Thanks @mbabker that works.

Change installation/application/framework.php to require import.legacy.php instead of import.php.

see #11895

@slibbe can you test the PR?

avatar zero-24 zero-24 - change - 2 Sep 2016
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2016-09-02 17:34:15
Closed_By zero-24
avatar joomla-cms-bot joomla-cms-bot - close - 2 Sep 2016
avatar joomla-cms-bot
joomla-cms-bot - comment - 2 Sep 2016

Set to "closed" on behalf of @zero-24 by The JTracker Application at issues.joomla.org/joomla-cms/11891

avatar slibbe
slibbe - comment - 3 Sep 2016

Test PR11895? I will.

I think I noticed this behaviour somewhere in de 3.6 alpha/beta stage, but was too busy at that time to check.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11891.

avatar slibbe
slibbe - comment - 3 Sep 2016

@zero24 The mail function was disbled on the server; however when setting on the mail-catcher (making it seem that the mail-function is available) the installation continues as expected.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11891.

Add a Comment

Login with GitHub to post a comment