Post by Jackalgirl » Fri Jul 30, 2021 7:52 am

Howdy, all,

I am using a new installation of opencart 3.0.3.7 that I installed on my site using Softalicious. I was originally using a theme (that I realized isn't really all that compatible) but then backed up to the default standard template. So I'm now using the standard default vanilla template.

I have not installed any extensions other than two themes (which I am not actually using). I'm using some of the standard core extensions: Paypal Commerce and the USPS shipping extension (I did modify the usps.php file to include the proper term for first class parcel so that it would show up during checkout.

I'm finding that sometimes (but not always), I get "error undefined" when attempting to add an item to my cart. And also, I'm finding that usually, the "error undefined" will show up while I'm going through the checkout process -- never at the same step, though. If I reload the page, I restart the checkout process, and usually the "error undefined" will show up at a different spot -- about one time in three or four, I can get all the way to the point where I'd be redirected to Paypal.

My config.php file lists my url without the www for the server (both http and https). I am accessing the site via the "non www" version of the url, and I've checked it during the checkout process: it doesn't appear to be adding the "www" to the url, it's always the "non www" version of it. I did try modifying the .htaccess file to ensure that any calls to www would be redirected to the "non www" site; however, the minute I did that, not only did it not fix the checkout issue, but I was kicked out of the admin system and when I tried to log back in, the login screen simply refreshed itself. Taking the added code out of .htaccess fixed the admin problem.

The error log is not showing anything, and the overall php error log for my site isn't showing anything either. I'm about to go try some other browsers (I'm using Safari) to see if that might provide a clue, but in the meantime, if you know of anything, I'd really appreciate it. Thank you in advance!

Newbie

Posts

Joined
Fri Jul 30, 2021 7:11 am

Post by ADD Creative » Fri Jul 30, 2021 6:56 pm

Both HTTP_SERVER and HTTPS_SERVER need to be set to the same URL starting with 'https://'. If you want your store to use www then make is it has 'https://www.'. Do the same in you admin/config.php.

Code: Select all

// HTTP
define('HTTP_SERVER', 'https://www.example.com/');

// HTTPS
define('HTTPS_SERVER', 'https://www.example.com/');
Then set your htaccess to redirect from non-www to www. Or the other way around if you don't want www.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by paulfeakins » Fri Jul 30, 2021 7:54 pm

Sounds like Mod Security to me - ask your host to disable it.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by Jackalgirl » Sun Aug 01, 2021 9:15 am

Thanks, Paul -- I had to have them add the admin directory to ModSecurity's whitelist; I will ask them to add the entire store directory to the white list as well and see if that fixes the issue.

Newbie

Posts

Joined
Fri Jul 30, 2021 7:11 am

Post by paulfeakins » Mon Aug 02, 2021 6:33 pm

Jackalgirl wrote:
Sun Aug 01, 2021 9:15 am
Thanks, Paul -- I had to have them add the admin directory to ModSecurity's whitelist; I will ask them to add the entire store directory to the white list as well and see if that fixes the issue.
Great, let us know if that fixes it.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

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

Users browsing this forum: sidclel and 84 guests