Page 2 of 5

Re: [SOLVED] Admin, Add or Edit Order - Unexpected end of in

Posted: Wed Dec 03, 2014 5:34 pm
by shamanit
pm-netti wrote:
shamanit wrote:
pm-netti wrote:@shamanit
@billkor

1. When an error is admin home page, option: make one test order ( ajax is not found orders for front)
2. Check and change need in database field 'api_id' to 1 in table 'api'
also
I just checked on my api table and the api id is already 1
when I change IP in apache virtualhost from 93.170.128.114 to 127.0.0.1, then msg in nginx log disappear, but edit/remove orders still dont work. In this time no log, no php error, no msg in apache log, no msg in nginx log!?! ???

if remove API user or remove API key, then get:

Code: Select all

SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
OK
Otherwise frontend server (nginx) response HTTP "504 Gateway Time-out"...

hemorrhoids :-[
Clean setting table:
http://forum.opencart.com/viewtopic.php ... 97#p530417
And add settings config_processing_status and config_complete_status
you trick does not help fix, because this problem exist on clean installation opencart 2.0.1.0 :crazy:

Re: [SOLVED] Admin, Add or Edit Order - Unexpected end of in

Posted: Wed Dec 03, 2014 5:38 pm
by pm-netti
shamanit wrote: you trick does not help fix, because this problem exist on clen installation opencart 2.0.1.0 :crazy:
Is it your order list is empty?

Re: [SOLVED] Admin, Add or Edit Order - Unexpected end of in

Posted: Wed Dec 03, 2014 5:50 pm
by shamanit
pm-netti wrote:
shamanit wrote: you trick does not help fix, because this problem exist on clen installation opencart 2.0.1.0 :crazy:
Is it your order list is empty?
Yes, empty! Then I try add orders, then I get this bugs HTTP "504 Gateway Time-out" or "SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data" if remove API user or remove API key.

Re: [SOLVED] Admin, Add or Edit Order - Unexpected end of in

Posted: Wed Dec 03, 2014 5:59 pm
by pm-netti
shamanit wrote:
pm-netti wrote:
shamanit wrote: you trick does not help fix, because this problem exist on clen installation opencart 2.0.1.0 :crazy:
Is it your order list is empty?
Yes, empty! Then I try add orders, then I get this bugs HTTP "504 Gateway Time-out" or "SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data" if remove API user or remove API key.
Can the customer account creation?

Re: [SOLVED] Admin, Add or Edit Order - Unexpected end of in

Posted: Wed Dec 03, 2014 6:17 pm
by shamanit
pm-netti wrote: Can the customer account creation?
Client for frontend or user for backend?

Re: [SOLVED] Admin, Add or Edit Order - Unexpected end of in

Posted: Wed Dec 03, 2014 6:34 pm
by pm-netti
shamanit wrote:
pm-netti wrote: Can the customer account creation?
Client for frontend or user for backend?
Front in route account/register.

Re: [SOLVED] Admin, Add or Edit Order - Unexpected end of in

Posted: Wed Dec 03, 2014 6:37 pm
by shamanit
pm-netti wrote:
shamanit wrote:
pm-netti wrote: Can the customer account creation?
Client for frontend or user for backend?
Front in route account/register.
No problem.

Re: [SOLVED] Admin, Add or Edit Order - Unexpected end of in

Posted: Wed Dec 03, 2014 6:48 pm
by pm-netti
shamanit wrote: No problem.
Can you do test other?

Re: [SOLVED] Admin, Add or Edit Order - Unexpected end of in

Posted: Wed Dec 03, 2014 7:00 pm
by shamanit
pm-netti wrote:
shamanit wrote: No problem.
Can you do test other?
What is meant?

Re: [SOLVED] Admin, Add or Edit Order - Unexpected end of in

Posted: Wed Dec 03, 2014 7:12 pm
by pm-netti
shamanit wrote:
pm-netti wrote:
shamanit wrote: No problem.
Can you do test other?
What is meant?
........test order?
;)

Re: [SOLVED] Admin, Add or Edit Order - Unexpected end of in

Posted: Wed Dec 03, 2014 7:39 pm
by shamanit
pm-netti wrote: ........test order?
;)
Noooo, enough. 8) I installed Magento, all worked fine, and now I happy :drunk:

Re: [SOLVED] Admin, Add or Edit Order - Unexpected end of in

Posted: Wed Dec 10, 2014 4:07 pm
by rangitotogirl
Thanks for your help on this one, I managed to fix it. Just thought I'd rewrite it to make it a little clearer.

1. In Opencart Admin, go to Settings >> API and create a new user.
2. In cPanel navigate to phpMyAdmin and then select your database where your store is installed.
3. Find table oc_setting and then find key "config_api_id".
4. Set the value field to 1 where key = config_ap_id (it was set to 0 on my system).
5. Next go to table oc_api and check that api_id = 1

Re: [SOLVED] Admin, Add or Edit Order - Unexpected end of in

Posted: Mon Dec 22, 2014 4:20 am
by hitsilent
Hi i have the actually same problem.no matter i do it shows up SyntaxError.

1.no Maintenance Mode.
2.set up API user under store setting . even i create a new one and set it up.
3.set etc/host file point my domain to ip.
4.delete htaccess file no password protect .

but still doesn't work. any Idea ?! i think its the Javascript cross domain problem.

Re: [SOLVED] Admin, Add or Edit Order - Unexpected end of in

Posted: Mon Dec 22, 2014 10:20 am
by rangitotogirl
hitsilent wrote:Hi i have the actually same problem.no matter i do it shows up SyntaxError.

1.no Maintenance Mode.
2.set up API user under store setting . even i create a new one and set it up.
3.set etc/host file point my domain to ip.
4.delete htaccess file no password protect .

but still doesn't work. any Idea ?! i think its the Javascript cross domain problem.
Did you read my post, immediately above yours and follow the instructions?

Re: [SOLVED] Admin, Add or Edit Order - Unexpected end of in

Posted: Tue Dec 23, 2014 6:15 am
by RonLens
This problem drives me crazy. :crazy:
Sometimes it works and sometimes not.

But to be honest, what's the reason for accessing any datas by CURL within the same domain? For me it doesn't make any sense and it's also very buggy.

Re: [SOLVED] Admin, Add or Edit Order - Unexpected end of in

Posted: Tue Dec 23, 2014 10:01 am
by Nesster
But to be honest, what's the reason for accessing any datas by CURL within the same domain?
Even though we have it working, I'd be interested to know why as well, for personal knowledge.

Re: [SOLVED] Admin, Add or Edit Order - Unexpected end of in

Posted: Thu Dec 25, 2014 12:51 am
by tdra
another fix? the fix from rangitotogirl only gives me header errors

Re: [SOLVED] Admin, Add or Edit Order - Unexpected end of in

Posted: Fri Dec 26, 2014 4:03 am
by pm-netti
RonLens wrote:This problem drives me crazy. :crazy:
Sometimes it works and sometimes not.

But to be honest, what's the reason for accessing any datas by CURL within the same domain? For me it doesn't make any sense and it's also very buggy.
I found new feature. :)

Page: Order Edit History
Press: Save
Reponse: Payment Method required!
Press: Button Update in field Payment Method.
Response: Success.

Re: [SOLVED] Admin, Add or Edit Order - Unexpected end of in

Posted: Sun Dec 28, 2014 12:25 am
by rachidgeldi
rangitotogirl wrote:Thanks for your help on this one, I managed to fix it. Just thought I'd rewrite it to make it a little clearer.

1. In Opencart Admin, go to Settings >> API and create a new user.
2. In cPanel navigate to phpMyAdmin and then select your database where your store is installed.
3. Find table oc_setting and then find key "config_api_id".
4. Set the value field to 1 where key = config_ap_id (it was set to 0 on my system).
5. Next go to table oc_api and check that api_id = 1
Thank you for summarizing. People for whom this doesn't work, might have forgotten to activate their newly made API user in the store settings.

Re: [SOLVED] Admin, Add or Edit Order - Unexpected end of in

Posted: Fri Jan 16, 2015 8:53 pm
by cornernote
Another reason this can occur is if your host is running mod_security. If this is the case you will have to contact them and ask they disable it for your account.

Just spent the last few hours debugging to find this. Hope it helps someone.