Post by windchi » Tue Apr 26, 2016 4:01 am

Hi,

I added code to force https:// instead of http://. It works fine and the store appears to work always going to https. But now I can't log in to my Admin. I type password and username and it just repeats the log in screen. I edit out the code to force ssl and I can then log-in to my admin page, although I still get an "undefined" error message. I can add product, etc.
And, the front end of the store appears to be working fine, although I have not yet tried a purchase.

I edited config files in both root and /admin:
<?php
// HTTP
define('HTTP_SERVER', 'https://xxxxxxx.com/admin/');
define('HTTP_CATALOG', 'https://xxxxxxx.com/');

// HTTPS
define('HTTPS_SERVER', 'https://xxxxxx.com/admin/');
define('HTTPS_CATALOG', 'https://xxxxxxx.com/');

Here is the code I used to force ssl - I added to .htaccess:
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule (.*) https://www.xxxxx.com/$1 [R]

Is there is some routing going on where the admin request is not being routed to a SSL page?
Any help would be appreciated as I don't have a clue where to go from here. It seems there would be a config file that I could change but I can't find it. Also, I do have the admin setting under settings to SSL on.

Newbie

Posts

Joined
Sat May 26, 2012 2:57 am

Post by windchi » Tue Apr 26, 2016 6:52 am

OK, I went in to /system/config and changed all the files where /ssl = false to ssl= true and I am now able to log in.
I still get an undefined error and am not able to change many parameters although I can add products.
When I hit a menu item I get the same message as when I first log in: "xxx.com says Error undefined". The fact that it says xxx.com and not https://xxx.com may or may not mean anything.
I don't understand why the system didn't make all the changes when I turn on server setting SSL in the backend. It appears that there are still somewhere some undefined pointers to http instead of https; I can't find them.

Any ideas?

Newbie

Posts

Joined
Sat May 26, 2012 2:57 am

Post by Randem » Tue Apr 26, 2016 2:28 pm

Hi windchi,

You did not mention what version of OpenCart you are using so here is a lot of varying information. There are a few changes you need to make to OpenCart to make it run properly in SSL. Check the links for the fixes to v2.1.0.x and v2.2.0.0.

Solution for "error undefined" message in V2.2.0.0
Other Helpful Information

This should help a lot...

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by windchi » Sat Apr 30, 2016 11:43 am

Thanks for the reply!
I have been trying to go through everything. Looks like I do need to install your fixes. But I already had forced HTTPS and made sure all the references to domain were the same and fixed the admin issue of being able to log in. Really wish I had of researched before installing 2.2.
How easy is it to downgrade or is that even possible since I have already made many data entries and don't want to lose my database?

I am having other issues like product and categories - on some the menu finds the product and on some it doesn't, no matter what I enter it will not appear under the menu category. Also menu is maxed out at 4 items and it won't pick up any more even though they are entered.

Newbie

Posts

Joined
Sat May 26, 2012 2:57 am

Post by Randem » Sat Apr 30, 2016 11:55 am

When the "upgrade" was thought about there was probably no intent to downgrade the user if they did not like it. This is one reason for a test system so you find these sorts of things out before attempting a live upgrade. if you have the original database you can start from there...

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by integris » Fri Jun 24, 2016 12:54 am

I compiled a list of fixes that I had to make to get my OC 2.2 site working with SSL/https/www on all pages here: http://stackoverflow.com/questions/3627 ... t/37996993

Hope it's useful to somebody; what a pain..

Newbie

Posts

Joined
Wed May 18, 2016 4:14 am
Who is online

Users browsing this forum: No registered users and 8 guests