Osclass Support Forums

General osclass questions => Report bug => Topic started by: officela on December 08, 2020, 02:35:29 PM

Title: After New Register Error 500
Post by: officela on December 08, 2020, 02:35:29 PM
Hello,

Updated to 4.2.0 and when i have a new user registration when i press register i should go to the main page with popup box informing me that i should check my email to activate the account, instead i get a white page of Error 500 ...... pressing refresh the page and it goes to the home page but without the popup..... something is not working as it should? how to fix this?   keep in mind the user is created normal when i go to back-end i can see the user i just created.

I found that i get the same error when i publish new property ! error 500
Title: Re: After New Register Error 500
Post by: MB Themes on December 08, 2020, 03:20:44 PM
@officela
1) enable error log and check what you have there
2) try to disable all plugins and test again
Title: Re: After New Register Error 500
Post by: officela on December 08, 2020, 03:39:53 PM
Hello,
I've found the error!
Settings > Mail Server > Use POP before SMTP

I unchecked that and everything works great!
Title: Re: After New Register Error 500
Post by: MB Themes on December 08, 2020, 03:43:33 PM
@officela
Yes if mail is being sent and error is thrown from PHP mailer, it will end up with error.
It's good to test mail server as first.
Title: Re: After New Register Error 500
Post by: officela on December 08, 2020, 03:45:15 PM
I haven't touched that since 3.8 version or last time i upgraded on 4.1.1 version and could not think at all for this.....

happy to found from debug ........ Thanks Maybe this will help others too :)


Title: Re: After New Register Error 500
Post by: cartagena68 on December 14, 2020, 04:15:17 PM
Also can be fixed in core side, in utils.php at the function osc_sendMail()
You can add this line after if (osc_mailserver_pop()) {
Code: [Select]
require_once osc_lib_path() . 'vendor/phpmailer/phpmailer/class.pop3.php' ;
But will be overwritten with every osclass update
Title: Re: After New Register Error 500
Post by: MB Themes on December 14, 2020, 05:16:46 PM
@cartagena68
PHP mailer does not use this file from 6 version, not quite sure if this would be correct solution.
Title: Re: After New Register Error 500
Post by: cartagena68 on December 14, 2020, 11:13:48 PM
@MB Themes

I find it using the error log, was saying that no such file (class.pop3.php) in the directory, added that line to the file had solved the problem for me, of course, today with the new update I had to add the line again
Title: Re: After New Register Error 500
Post by: MB Themes on December 15, 2020, 03:43:38 PM
@cartagena68
Yes but in vendors folder, if you would clean up before installation, you would realize this file is not part of PHP mailer anymore.
https://github.com/PHPMailer/PHPMailer/tree/master/src
Title: Re: After New Register Error 500
Post by: cartagena68 on December 15, 2020, 08:41:22 PM
@MB Themes
Ok, but in the function osc_sendMail($params) in utils.php the POP3 class is called, where it gets the class from? I see that there is a POP3.php file with the class POP3, maybe you should require that file
Title: Re: After New Register Error 500
Post by: MB Themes on December 15, 2020, 10:44:38 PM
Autoloader from vendors folder handle all dependencies and is generated by composer.