Post by AlanARG » Fri Oct 02, 2020 8:38 am

/EDIT: So.. the error was the email settings. I selected "SMTP" because the order email was going to junk and I read somewhere that I should SMTP but for some reason that was causing a bug at the checkout.
In any case, I changed it to "email" and now it works.
I discovered this by activating the error logs and "display error" in the php configuration from my host.

Thanks everyone!

--------------------

Hey guys! how's it going?

I'm getting an error at the checkout right at the end when I press the "place order" button, it didn't happen a couple of days ago and I have an everyday backup of database + public_html folder so I guess I can just rollback, right?

Anyway, the error is not showing anything on the log found in "System > Maintenance > Error logs" and when I test it out it just says "error" and nothing more.

All I found in the log was something that says:

Code: Select all

2020-09-25 23:44:07 - PHP Warning:  A non-numeric value encountered in /home/c1811017/public_html/admin/controller/sale/order.php on line 1799
2020-09-25 23:44:07 - PHP Warning:  A non-numeric value encountered in /home/c1811017/public_html/admin/controller/sale/order.php on line 1799
I tested it out right now and the logs didn't update and there's nothing there from today (October 1st).

Any ideas? Thanks!

PS: If u wanna check it out, here it is, just log in with username "test" pw "test123".
Last edited by AlanARG on Mon Oct 05, 2020 9:21 pm, edited 3 times in total.

Active Member

Posts

Joined
Mon Feb 22, 2016 6:15 pm

Post by sw!tch » Fri Oct 02, 2020 9:38 am

For the non-numeric issue see here - viewtopic.php?t=199151

If you don't see an error in your opencart log then check your server logs.

Full Stack Web Developer :: Send a PM for Custom Work / Fast Support.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm
Location - USA

Post by AlanARG » Fri Oct 02, 2020 11:31 am

sw!tch wrote:
Fri Oct 02, 2020 9:38 am
For the non-numeric issue see here - viewtopic.php?t=199151

If you don't see an error in your opencart log then check your server logs.
I applied that fix and didn't work :(
Found other lines in the log where it mentions "order" and "sale" words but I don't have a clue if those are the issue.

Where are the server logs? Sorry for the newbie question and thanks for ur help!

Active Member

Posts

Joined
Mon Feb 22, 2016 6:15 pm

Post by sw!tch » Fri Oct 02, 2020 11:36 am

Server error logs are typically in the root of your webspace in a logs folder. You can also look at your hosting control panel and see if there is a log section there.

Where is the error happening?

Full Stack Web Developer :: Send a PM for Custom Work / Fast Support.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm
Location - USA

Post by AlanARG » Fri Oct 02, 2020 11:44 am

sw!tch wrote:
Fri Oct 02, 2020 11:36 am
Server error logs are typically in the root of your webspace in a logs folder. You can also look at your hosting control panel and see if there is a log section there.

Where is the error happening?
At the checkout when I press the "place order" button, right at the end. Says "ERROR" and nothing more. It didn't happen before.

Can't find the server logs ANYWHERE lol
https://imgur.com/rFZ3bOS

Active Member

Posts

Joined
Mon Feb 22, 2016 6:15 pm

Post by sw!tch » Fri Oct 02, 2020 12:43 pm

You may have to reach out to your web host to get them, check from your web host control panel.

You can try using chrome inspector and have the developer tools panel open while checking out. Then check the console logs for a more detailed error or check the XHR response from the network panel.

Full Stack Web Developer :: Send a PM for Custom Work / Fast Support.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm
Location - USA

Post by AlanARG » Fri Oct 02, 2020 1:04 pm

sw!tch wrote:
Fri Oct 02, 2020 12:43 pm
You may have to reach out to your web host to get them, check from your web host control panel.

You can try using chrome inspector and have the developer tools panel open while checking out. Then check the console logs for a more detailed error or check the XHR response from the network panel.
thanks for all the help man! I already sent a message to host's CS since I can't find anywhere in the control panel the error logs option.

Regarding the Chrome Inspector this is what I got: https://imgur.com/a/3mVf0rx

I guess the best option would be to just restore the website to a previous state, like 2 days ago I have a full backup of DB and public_html folder, using OpenCart tools and the host to make the backup. Is it easy to rollback?

Active Member

Posts

Joined
Mon Feb 22, 2016 6:15 pm

Post by sw!tch » Fri Oct 02, 2020 1:30 pm

Yeah its getting 500 error, so you need to get the cause from your server error log. Contact your web host for the location of your log files.

Did you change anything prior to this error? Looks related to the bank_transfer gateway...

Full Stack Web Developer :: Send a PM for Custom Work / Fast Support.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm
Location - USA

Post by AlanARG » Fri Oct 02, 2020 1:41 pm

sw!tch wrote:
Fri Oct 02, 2020 1:30 pm
Yeah its getting 500 error, so you need to get the cause from your server error log. Contact your web host for the location of your log files.

Did you change anything prior to this error? Looks related to the bank_transfer gateway...
I'm getting the same error whichever payment method I use (cash or whatever), maybe in that one says "bank transfer" or smth because I used that one to test it out.

I've added a new payment method with an extension I installed.
And I made some changes in "\catalog\language\es-es\common\cart.php" and "\catalog\language\es-es\checkout\cart.php":
Replaced this:

Code: Select all

$_['text_items']     = '%s item(s) - %s';
With this:

Code: Select all

$_['text_items'] = '%s;
Those modifications were made in Spanish but I don't think it's related to this error. I'm trying to make the purchase in English and same error.

I also added:

Code: Select all

@media (max-width: 767px){
#account-order .row .col-sm-6.text-right{
clear: both;
}
}
in here: /catalog/view/theme/Fortsi_Furniture/stylesheet/stylesheet.css
Last edited by AlanARG on Fri Oct 02, 2020 1:55 pm, edited 1 time in total.

Active Member

Posts

Joined
Mon Feb 22, 2016 6:15 pm

Post by AlanARG » Sat Oct 03, 2020 12:08 am

sw!tch wrote:
Fri Oct 02, 2020 1:30 pm
Yeah its getting 500 error, so you need to get the cause from your server error log. Contact your web host for the location of your log files.

Did you change anything prior to this error? Looks related to the bank_transfer gateway...
My host sent me this from server logs but in another post someone told me I need to access the php error logs, not the server logs.
In any case, does it ring any bell this below?

Code: Select all

[root@c181a ~] # cat /opt/apache/logs/error_log | grep nomadebaker.com
[Sun Sep 27 09:02:41.057163 2020] [:error] [pid 29456:tid 140127274608384] [client 152.168.214.195] ModSecurity: Request body (Content-Length) is larger than the configured limit (13107200). [hostname \"nomadebaker.com\"] [uri \"/admin/index.php\"] [unique_id \"X3B-YRBnk9tuLLIoaYrCbAABRwA\"]
[Fri Oct 02 06:58:13.489119 2020] [proxy_fcgi:error] [pid 23200:tid 139894290589440] [client 34.68.114.57:47500] AH01071: Got error \'Primary script unknown\', referer: http://nomadebaker.com/wp-login.php

Active Member

Posts

Joined
Mon Feb 22, 2016 6:15 pm

Post by sw!tch » Sat Oct 03, 2020 1:46 am

Keep this under one thread the other topic is for bug fixes.

Correct the server PHP error log, tell your web host you are getting a 500 internal server error and need the PHP log for your domain.

If your web host doesn't give you access to your PHP error logs, you could temporarily force error reporting on in full and set a path for the error_log, but not advisable if you don't know what you are doing.

Is this a cPanel server?

Full Stack Web Developer :: Send a PM for Custom Work / Fast Support.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm
Location - USA

Post by AlanARG » Sat Oct 03, 2020 1:56 am

sw!tch wrote:
Sat Oct 03, 2020 1:46 am
Keep this under one thread the other topic is for bug fixes.

Correct the server PHP error log, tell your web host you are getting a 500 internal server error and need the PHP log for your domain.

If your web host doesn't give you access to your PHP error logs, you could temporarily force error reporting on in full and set a path for the error_log, but not advisable if you don't know what you are doing.

Is this a cPanel server?
Oh ok, so sorry to keep posting in the other one.

Yes I already told my host I'm getting that error and I need access to the PHP error log. What you meant by "correct" the server PHP error log tho?

The "temporarily force error reporting on in full and set..." was quite technical and I don't think I should do it since I don't understand it haha.

No, is not cPanel but is quite similar. I have access to phpmyadmin and database, etc. Should I migrate to a cPanel webhosting?

Thanks a lot for ur help :)

Active Member

Posts

Joined
Mon Feb 22, 2016 6:15 pm

Post by AlanARG » Sat Oct 03, 2020 3:26 am

So.. the error was the email settings. I selected "SMTP" because the order email was going to junk and I read somewhere that I should SMTP but for some reason that was causing a bug at the checkout.
In any case, I changed it to "email" and now it works.
I discovered this by activating the error logs and "display error" in the php configuration from my host.

Thanks everyone!

Active Member

Posts

Joined
Mon Feb 22, 2016 6:15 pm

Post by sw!tch » Sat Oct 03, 2020 4:01 am

Make sure you turn display errors back off. You don't want errors printed to the screen on a production site.

Glad it's resolved.

Full Stack Web Developer :: Send a PM for Custom Work / Fast Support.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm
Location - USA

Post by paulfeakins » Mon Oct 05, 2020 7:31 pm

AlanARG wrote:
Sat Oct 03, 2020 3:26 am
So.. the error was the email settings. I selected "SMTP" because the order email was going to junk and I read somewhere that I should SMTP but for some reason that was causing a bug at the checkout.
In any case, I changed it to "email" and now it works.
I discovered this by activating the error logs and "display error" in the php configuration from my host.

Thanks everyone!
If this is now fixed please add [SOLVED] to the beginning of the post title.

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Guru Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom
Who is online

Users browsing this forum: No registered users and 28 guests