Post by dragoncorp » Wed Jun 10, 2015 9:29 pm

I also had this problem, for me has the config.php file that had the "HTTPS_SERVER" defined with https://... but I wasn't using https in my website, so curl was trying to comunicate with https with the catalog.

I had change the value of "HTTPS_SERVER" to http://... and now is working fine :)
Last edited by dragoncorp on Fri Jun 12, 2015 4:11 pm, edited 1 time in total.

Newbie

Posts

Joined
Wed Jun 10, 2015 9:24 pm

Post by vortexbased » Thu Jun 11, 2015 3:33 pm

TheLizard wrote:I don't use CloudFare and I am still getting this issue.

In fact, CloudFare is an embarrassment of a CDN. We have Rackspace Cloud and Akamai and S3 systems. This forum and site uses CloudFare and you get an annoying DDos que message; very amateur.
In fact, CloudFlare is much more than just a CDN, and it's far superior to most (all?) CDNs out there.

https://support.cloudflare.com/hc/en-us ... CloudFlare

"The 'Checking your browser before accessing (insertsite.com)' occurs when the site owner has turned on a DDoS protection and mitigation tool called "I'm Under Attack". The page will generally go away and grant you access to the site after 5 seconds."

Pretty much all large hosting companies are "Optimized Partners" of CloudFlare (https://www.cloudflare.com/hosting-partners), even Rackspace is a certified partner.

Optimized partners can give their clients access to RailGun (https://www.cloudflare.com/railgun), something that would require a $200 per month and domain Business account at CloudFlare.

Using RailGun makes especially dynamic website A LOT faster than they could ever be on any regular CDN.

Newbie

Posts

Joined
Thu Jun 11, 2015 3:26 pm

Post by vortexbased » Sat Jun 13, 2015 4:53 pm

dragoncorp wrote:I also had this problem, for me has the config.php file that had the "HTTPS_SERVER" defined with https://... but I wasn't using https in my website, so curl was trying to comunicate with https with the catalog.

I had change the value of "HTTPS_SERVER" to http://... and now is working fine :)
For me, the issue was similar, /admin/config.php was like this:

Code: Select all

// HTTP
define('HTTP_SERVER', 'http://www.mydomain.com/admin/');
define('HTTP_CATALOG', 'http://www.mydomain.com/');

// HTTPS
define('HTTPS_SERVER', 'http://mydomain.com/admin/');
define('HTTPS_CATALOG', 'http://mydomain.com/');
I added the www. to the https defines and the problem was gone.

Newbie

Posts

Joined
Thu Jun 11, 2015 3:26 pm

Post by chameleonwebservices » Tue Jun 16, 2015 1:26 am

We have spent days looking at this.

We have just carried out a clean install and added a product, purchased and the same issue.

We are using 2.0.3.1 and we have come tried all levels of PHP, etc.

This now driving us mad.


Posts

Joined
Tue Jun 16, 2015 1:24 am

Post by epdsantos » Thu Jun 25, 2015 1:53 am

I fixed using:
public function api() {
$json = array();

Opencart 2.0.3.1
Line 2154

Newbie

Posts

Joined
Wed Jul 02, 2014 11:27 pm

Post by deepvision » Thu Jun 25, 2015 2:46 am

casys123 wrote:Hellow everyone,

I got this error after installing a product configuration extension:

Fatal error: Cannot redeclare ModelCatalogProduct::editProductFee() in /home1/casys123/public_html/system/modification/admin/model/catalog/product.php on line 352


Please let me knwo how to fix it...Thanks
I experienced the same with the latest vqmod 2.5.1 but only on certain hostings.
For whatever the reason vqmod applied every modification twice for random extension.
To fix the issue I had to roll back to the vqmod 2.4.1.

ImageImageImage


User avatar
Active Member

Posts

Joined
Tue May 19, 2015 1:03 am

Post by hsomani0205 » Tue Jul 14, 2015 1:12 am

Okay i spent a whole weekend finding the issues in the system why its happening and the reason is very simple and so I am researching on finding the solution to the problem now.

Session variables are not accessible due to which the validation for API is failing...

I am working on this still and will update the findings and a solid fix to our grief...

REgards
Himanshu Somani

Newbie

Posts

Joined
Tue Jul 14, 2015 12:55 am

Post by skydrake » Sun Jul 19, 2015 12:57 am

guys, any luck? i tried all but no luck with the same results.
Image
Version 2.0.3.1

Newbie

Posts

Joined
Fri Jul 17, 2015 11:45 pm

Post by estroblock » Sun Jul 19, 2015 8:00 pm

I seem to have a similar issue using 2.0.3.1.

For me, I suspect this to be SSL/ server related issue. I tried a clean install without my ssl cert installed and was working fine.

I then installed my ssl cert to the domain, and changed the config files to allow ssl.

In doing so it has caused an error in order section:

" SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

OK

<b>Notice</b>: Undefined variable: json in <b>/home/alt/public_html/admin/controller/sale/order.php</b> on line <b>2221</b> "


I then tried the suggested change


CODE: SELECT ALL
public function api() {


change to:
CODE: SELECT ALL
public function api() {
$json = array();


Now I get error:


" SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

OK

{"country_id":"13","name":"Australia","iso_code_2":"AU","iso_code_3":"AUS","address_format":"","postcode_required":"0","zone":[{"zone_id":"191","country_id":"13","name":"Australian Capital Territory","code":"ACT","status":"1"},{"zone_id":"192","country_id":"13","name":"New South Wales","code":"NSW","status":"1"},{"zone_id":"193","country_id":"13","name":"Northern Territory","code":"NT","status":"1"},{"zone_id":"194","country_id":"13","name":"Queensland","code":"QLD","status":"1"},{"zone_id":"195","country_id":"13","name":"South Australia","code":"SA","status":"1"},{"zone_id":"196","country_id":"13","name":"Tasmania","code":"TAS","status":"1"},{"zone_id":"197","country_id":"13","name":"Victoria","code":"VIC","status":"1"},{"zone_id":"198","country_id":"13","name":"Western Australia","code":"WA","status":"1"}],"status":"1"} "

I have tried all the other suggested fix's I could find (including curl with another domain) and same issue.

I then tried to also remove my ssl cert and re-edit my config files for non ssl and it did not revert back to a functioning state. I was getting the same error as when the ssl was installed. So if I now want to have it functioning without ssl, it seems I require to do a fresh install.

So at this stage I have 2 options. Reinstall opencart and do not install ssl, or use it in its current state and not have the function to edit and delete orders, and do so manually through the database.

I hope a fix for this comes soon with the next version. Seems like the biggest issue with OC 2. atm.

Newbie

Posts

Joined
Mon Sep 29, 2014 11:25 am

Post by yodapt » Sun Jul 19, 2015 8:17 pm

@estroblock

Check if you have HTTPS_SERVER properly defined. Also check if you have created a user for the API and assigned it to the store.

Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com


User avatar
Active Member

Posts

Joined
Fri Jun 17, 2011 6:39 pm


Post by ashwani_multi » Tue Jul 21, 2015 3:34 pm

i solved same issue you can send me admin access i will solve for you

thank you

Opencart Quick checkout
View All modules
Any opencart issue contact me at support@opencartextensions.in

Thank you


User avatar
New member

Posts

Joined
Tue Dec 09, 2014 2:40 pm
Location - Ludhiana,Punjab,India

Post by estroblock » Thu Jul 23, 2015 6:31 am

ashwani_multi was that directed at me?

How did you go about resolving this?

Cheers

Newbie

Posts

Joined
Mon Sep 29, 2014 11:25 am

Post by zander86 » Fri Jul 24, 2015 2:39 am

Hi,

I'm struggling for weeks now with the same problem. SyntaxError: Unexpected end of input.
Error Log says:

SyntaxError: Unexpected token<
OK
<b>Notice</b>:Undefined variable: json in <b>/home/***/public_html/admin/controller/sale/order.php</b>on line <b>2221</b>

Now i have tried a lot. I have done everything i could find on this forum and Stackoverflow. Nothing helps. I tried the HTTPS in Config.php. Api user etc. etc.

I have discovered something and i would like to share that with you, maybe you can help me and maybe it will bring us closer to a solution. Correct me if i'm wrong but i'm not the only one struggling with this problem.

I'm running a multistore configuration > works like a charm. When i sell a product that is active in more then one shop i get the Json error stuff. A order with one or more products that are in one shop only. NO PROLEM.

How is this possible?

Newbie

Posts

Joined
Fri Jul 24, 2015 2:32 am

Post by estroblock » Sat Jul 25, 2015 10:18 am

I have discovered what is possibly a related issue.

When go to forgotten password from the admin page, then send en email request forgot password, no emails are sent back with the password details.

It seem there is an issue with the server sending information from the database to the requested destination.

These two issues may very well be connected.

zander86 are you running ssl at all?

Newbie

Posts

Joined
Mon Sep 29, 2014 11:25 am

Post by deepvision » Sat Jul 25, 2015 12:27 pm

zander86 wrote:I'm running a multistore configuration > works like a charm. When i sell a product that is active in more then one shop i get the Json error stuff.
Does it make any difference if a product was sold in one shop or another? Or always the same error regardless of the shop it was sold in?

ImageImageImage


User avatar
Active Member

Posts

Joined
Tue May 19, 2015 1:03 am

Post by zander86 » Sat Jul 25, 2015 5:37 pm

estroblock wrote:....

zander86 are you running ssl at all?
No, i'm not running SSL at the moment. Honestly i'm not sure how this is related. Could you fill me in?


deepvision wrote:....

Does it make any difference if a product was sold in one shop or another? Or always the same error regardless of the shop it was sold in?
Yes it does! When a product is sold in the default shop there is no problem at all! It's only when a product is sold in the second store. I found out that it doesn't matter if a product is active in more than one store.. If any product is sold in the second store you won't be ably to edit the order.

Detail: When a order is placed in the second store you cannot edit the order. You directly get the "SyntaxError: Unexpected end of input. OK". You have to press a button to dismiss the Chrome error message. And you can see the first tab of the edit screen you just can't press next/continue. You will get the error message again. What you can do is change the store. When you do thta everything works again! You can push next/continue en edit the order. You can delete the order everything. But when you change to second store. The problem is back!

I hope you can follow me, i'm dutch so my english could be a bit weak. I could make a recording of my screen if you like??

Newbie

Posts

Joined
Fri Jul 24, 2015 2:32 am

Post by yodapt » Sat Jul 25, 2015 6:35 pm

zander86 wrote: No, i'm not running SSL at the moment. Honestly i'm not sure how this is related. Could you fill me in?

Code: Select all

if ($store_info) {
	$url = $store_info['ssl'];
} else {
	$url = HTTPS_CATALOG;
}
This is why. Opencart expects either the SLL url of the current store or the SSL url of the main store. It will fail without it.

Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com


User avatar
Active Member

Posts

Joined
Fri Jun 17, 2011 6:39 pm


Post by zander86 » Sat Jul 25, 2015 6:47 pm

Ok ok i have read about it before. But are you saying that multistore setup only works with SSL? Even though ssl is deactivated on all shops?

Newbie

Posts

Joined
Fri Jul 24, 2015 2:32 am

Post by zander86 » Sat Jul 25, 2015 10:48 pm

I might have found the problem! When you create a second store you have to fill in the shop URL. Below that you can fill in shop SSL URL but that is not a required field. I did not fill that in because i don't have my ssl stuff ready.

So i just filled in the same shop URL as above and now everything seems to work!

I will continue testing and i will give a follow up on this later...

Newbie

Posts

Joined
Fri Jul 24, 2015 2:32 am

Post by estroblock » Tue Jul 28, 2015 6:57 am

Thanks for the info guys.

So this issue does seem to have something to do with ssl settings.

I am running SSL on every page of my store.

I am not running multiple stores.

I still get error:

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

OK

Array
(
[currency] => AUD
[user_id] => 1
[token] => 831bed96f4746859fe40afd8584b933d
[j2_redirect] => sale/order/info
[language] => en
[cart] => Array
(
)

[total_value] => 0
)
<b>Notice</b>: Undefined variable: json in <b>/home/a/public_html/admin/controller/sale/order.php</b> on line <b>2223</b>

I have a feeling there might be some conflicting ssl settings somewhere.

yodapt do you think it's to do with the code you posted?

many thanks guys

Newbie

Posts

Joined
Mon Sep 29, 2014 11:25 am
Who is online

Users browsing this forum: No registered users and 27 guests