Post by joegolike » Mon Nov 17, 2008 1:54 pm

I'm seeing an error with the Zone drop-down field on the Account Create page. When the page loads no items are being added to the Zone drop-down. Choosing a different Country does not populate the Zone drop-down either.

Firebug gives me the following errors on page load:
1) Security Error: Content at https://www.rachelburklund.com/store/in ... unt_create may not load data from http://www.rachelburklund.com/store/ind ... ne_id=3674.
2) Error: uncaught exception: [Exception... "Access to restricted URI denied"  code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)"  location: "http://www.rachelburklund.com/store/cat ... /jquery.js Line: 1708"]

It seems like the problem has to do with the fact that the Create Account page is loaded by https, the ajax call to populate the Zone drop-down is trying to load via http. I confirmed this by switching off SSL in Admin > Config > Setting. With SSL off the drop-down loads successfully with no Firebug error. Turning SSL back on gives the error again.

Here is our store's url to verify the error:
https://www.rachelburklund.com/store/in ... unt_create

I believe this is v0.7.8, though I installed this awhile ago and admittedly don't know where in the UI or code to verify the version.

New member

Posts

Joined
Fri May 23, 2008 3:42 pm

Post by joegolike » Tue Nov 18, 2008 11:52 am

Is anyone else seeing this error when SSL is enabled?

New member

Posts

Joined
Fri May 23, 2008 3:42 pm

Post by Qphoria » Tue Nov 18, 2008 12:03 pm

I have not. Would it be possible to try it with the latest 0.7.9 RC3? I don't currently have ssl setup (tho we are working on it)

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by joegolike » Tue Nov 18, 2008 2:13 pm

If I was still testing this site, I'd try out 0.7.9 rc3, but we just went live. By the way, do you know how to check the currently installed OpenCart version?

New member

Posts

Joined
Fri May 23, 2008 3:42 pm

Post by Qphoria » Tue Nov 18, 2008 3:51 pm

We just started adding the version number to the config in 0.7.9. You likely have 0.7.8

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by joegolike » Wed Nov 19, 2008 12:22 am

I'll try a fresh install of 0.7.9 rc3 on another folder on the same server and see if I can duplicate the issue.

In the meantime I have SSL turned off on the live site until we resolve this issue. Now I'm trying to find out if SSL is really necessary. I've opened up another thread on that topic here:
http://forum.opencart.com/index.php/topic,2280.0.html

New member

Posts

Joined
Fri May 23, 2008 3:42 pm

Post by jupitech2000 » Wed Nov 19, 2008 1:51 am

I have the same problem, and I've been trying to solve this issues.  Even if I tried to turn off SSL, the drop-down still not populate.  is ther anything else I could do to solve this. take care.

User avatar
Newbie

Posts

Joined
Tue Aug 05, 2008 5:34 am

Post by joegolike » Wed Nov 19, 2008 2:15 am

I would suggest using Firebug to see if there is a Javascript error. That's how I discovered that my problem had to do with SSL.

New member

Posts

Joined
Fri May 23, 2008 3:42 pm

Post by hm2k » Wed Nov 19, 2008 2:47 am

Try upgrading jquery in the javascript/ajax/ directory, see if that helps.

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK

Post by Qphoria » Wed Nov 19, 2008 2:55 am

Going along with what hm2k said, it seems that perhaps this outdated version of jquery in 0.7.8 & 0.7.9RC3 is possibly lacking this ability. Surprised it's taken this long to find but here is a bit of information about the error that you saw in the original post:

http://www.leveltendesign.com/solution/ ... g-ajax-cal

You can download the latest version here:
http://code.google.com/p/jqueryjs/downl ... y-1.2.6.js

rename the file to "jquery.js" and upload & overwrite the file located here:
\catalog\javascript\ajax\jquery.js

See if that works for you
Last edited by Qphoria on Wed Nov 19, 2008 3:02 am, edited 1 time in total.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by joegolike » Wed Nov 19, 2008 3:26 pm

I did some testing on our live server.

1) The latest jquery (1.2.6) does not fix the problem

2) I installed a fresh copy of v0.7.9-rc3 pointed to a new db, and I still see the same behavior: SSL on makes the Zone drop-down empty with a javascript error, SSL off and everything seems to work fine.

http://www.rachelburklund.com/test/v0.7.9-rc3/

At this point I know that the problem is either on our server's end, or it's with OpenCart.

Does anyone have v0.7.8+ installed and running with SSL on that is not seeing this problem?

New member

Posts

Joined
Fri May 23, 2008 3:42 pm

Post by samarjit » Wed Nov 19, 2008 7:52 pm

Here you are trying to access the url using http but in the ajax but your original protocol is https.But you can't access uri using different protocol or domain name  from a different protocol or domain name.
You just change the protocol of the url you are using for ajax from http to https.
e.g. change http://www.rachelburklund.com/store/index.php? ... unt_create to https://www.rachelburklund.com/store/index.php? ... unt_create

Newbie

Posts

Joined
Wed Nov 19, 2008 7:33 pm

Post by Qphoria » Wed Nov 19, 2008 7:54 pm

But i would think it would be transparent as the load call to jquery just uses the relative url path, which if it https, then it should load the https version of the script. But that doesnt seem to be the case

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by samarjit » Wed Nov 19, 2008 8:00 pm

i think it doesn't .....have a look at the source of the page....all the links are using http 

Newbie

Posts

Joined
Wed Nov 19, 2008 7:33 pm

Post by Qphoria » Wed Nov 19, 2008 8:22 pm

But they are listed as relative paths:

.......


so they should be transparent.


I see that if I change the:

Code: Select all

onchange="$('#zone').load('[color=red]index.php?controller=account_create&action=zone&country_id='+this.value+'&zone_id=3563[/color]');"
to:

Code: Select all

onchange="$('#zone').load('[color=red]https://www.rachelburklund.com/test/v0.7.9-rc3/index.php?controller=account_create&action=zone&country_id='+this.value+'&zone_id=3563[/color]');"
It works fine. But since it's apparently relative, why isn't it dynamic

-EDIT-
OHH cuz of the base url:

Code: Select all

<base href="http://www.rachelburklund.com/test/v0.7.9-rc3/">
So the base needs to reflect ssl status
Last edited by Qphoria on Wed Nov 19, 2008 8:24 pm, edited 1 time in total.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Wed Nov 19, 2008 8:28 pm

Hmm... the code appears to be there in the index.php file:

// Base URL
if (@$_SERVER['HTTPS'] != 'on') {
$template->set('base', HTTP_SERVER);
} else {
$template->set('base', HTTPS_SERVER);
}

But in the debugger
@$_SERVER['HTTPS'] shows up as null which would never be 'on'

-EDIT- Seems that is a valid setting, I just don't have SSL working on my debug site to test with. But it appears your webhosts apache server isn't passing that environment variable

Can you view your php info and look for HTTPS variable. Perhaps post it here so we can peruse it
Last edited by Qphoria on Wed Nov 19, 2008 9:00 pm, edited 1 time in total.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by hm2k » Wed Nov 19, 2008 9:06 pm

Sounds to me like your httpd isn't returning the variable correctly.

Please can you provide me a direct link to a phpinfo file on your HTTPS server.

Thanks.

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK

New member

Posts

Joined
Fri May 23, 2008 3:42 pm

Post by joegolike » Thu Nov 20, 2008 2:07 am

Q: Thanks for the tip about using the full https url in the AJAX call. As a temporary solution I've patched the handful of tpl's on our live store that use that ajax call, just so we can get SSL back on for the time being.

New member

Posts

Joined
Fri May 23, 2008 3:42 pm

Post by Qphoria » Thu Nov 20, 2008 3:40 am

hmm phpinfo shows
HTTPS 1

Shouldn't it be
HTTPS 'on'

that is how it is on all the sites I found online..
https://secure18.easycgi.com/phpinfo.php - Shows HTTPS - on
https://cgi.ccs.neu.edu/home/cgiadmin/e ... hpinfo.php - Shows HTTPS - on
https://www.commu-suppo.net/ - Shows HTTPS - on


Perhaps 1 is also valid?
Last edited by Qphoria on Thu Nov 20, 2008 3:47 am, edited 1 time in total.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 1 guest