SyntaxError: Unexpected end of input (Chrome)
SyntaxError: Syntax Error (IE)
Hi, I have searched high and low on this issue, as this error first appeared to be related with our site being password protected (apache .htaccess file). Now as I have verified and re-verified the virtual host where OpenCart is installed, I'm sure there is no password protection. There IS a virtual host that is protected in this way on our server, but it's not relevant to OC.
I made sure the API was set up correctly too. Even tried creating another API user to make sure.
The site is not in maintenance mode.
We are working on finding the source of this problem ourselves, but I'd like to know if others still have this issue (and without htpasswd protection).
GitHub version.
Frank
SyntaxError: Syntax Error (IE)
Hi, I have searched high and low on this issue, as this error first appeared to be related with our site being password protected (apache .htaccess file). Now as I have verified and re-verified the virtual host where OpenCart is installed, I'm sure there is no password protection. There IS a virtual host that is protected in this way on our server, but it's not relevant to OC.
I made sure the API was set up correctly too. Even tried creating another API user to make sure.
The site is not in maintenance mode.
We are working on finding the source of this problem ourselves, but I'd like to know if others still have this issue (and without htpasswd protection).
GitHub version.
Frank
Last edited by Nesster on Thu Nov 13, 2014 10:09 pm, edited 4 times in total.
I use 2.0.0.0 - do you have site in maintenance mode? Try to switch it off.
Do you maybe know answer to my problem? http://forum.opencart.com/viewtopic.php?f=181&t=132717
Do you maybe know answer to my problem? http://forum.opencart.com/viewtopic.php?f=181&t=132717
Here is what happened for us on this case.
First: some useful background to understand what's happening:
When, even in the admin, you modify (add, edit or delete) an order, the logic is to use the API to do so. The API acts as client, as if it was an actual client on the front-end.
While narrowing down the issue, I noticed the curl object that was created by the API was NULL (I freaking love ChromePhp btw). So it got me thinking, what if the API can't resolve my hostname (we're using apache virtualhosts for the dev environment). And that was it: Adding the servername to the /etc/hosts file pointing to the appropriate IP, it all started working.
I then setup more appropriate DNS entries and revised our NAT reflection policy to have a more adequate config, but with the hosts file it's a quick and dirty way to make sure it's not your problem also.
Frank
First: some useful background to understand what's happening:
When, even in the admin, you modify (add, edit or delete) an order, the logic is to use the API to do so. The API acts as client, as if it was an actual client on the front-end.
While narrowing down the issue, I noticed the curl object that was created by the API was NULL (I freaking love ChromePhp btw). So it got me thinking, what if the API can't resolve my hostname (we're using apache virtualhosts for the dev environment). And that was it: Adding the servername to the /etc/hosts file pointing to the appropriate IP, it all started working.
I then setup more appropriate DNS entries and revised our NAT reflection policy to have a more adequate config, but with the hosts file it's a quick and dirty way to make sure it's not your problem also.
Frank
Hi, I'm experiencing this problem as well and it's driving me nuts. I do NOT have my site in maintenance mode, as is suggested throughout this forum, and as far as I can tell everything is configured as it should be. Api user is configured too.
Anyone who can help: please do! I'm offering to pay money for this, even. Thanks!
David
Anyone who can help: please do! I'm offering to pay money for this, even. Thanks!
David
Make sure your oc site is not protected by a .htaccess with logon security in it. I read it also creates this problem.
As for dns (name resolution) if you have console or ssh access to your server, try to ping your hostname (the namr or domain name your site is running on). If it doesn't respond there's your problem.
As for dns (name resolution) if you have console or ssh access to your server, try to ping your hostname (the namr or domain name your site is running on). If it doesn't respond there's your problem.
Nesster wrote:Here is what happened for us on this case.
First: some useful background to understand what's happening:
When, even in the admin, you modify (add, edit or delete) an order, the logic is to use the API to do so. The API acts as client, as if it was an actual client on the front-end.
While narrowing down the issue, I noticed the curl object that was created by the API was NULL (I freaking love ChromePhp btw). So it got me thinking, what if the API can't resolve my hostname (we're using apache virtualhosts for the dev environment). And that was it: Adding the servername to the /etc/hosts file pointing to the appropriate IP, it all started working.
I then setup more appropriate DNS entries and revised our NAT reflection policy to have a more adequate config, but with the hosts file it's a quick and dirty way to make sure it's not your problem also.
Frank
I do not think it's a proper way, it should fixed from the source not your own.
OpenCart :
The best Open Source Cart for eCommerce
I can succesfully ping my host, and as far as I can tell, (I'm not really an expert) my site isn't .htaccess password protected... Still no clue as to how I can get this fixed.. Thanks though! Any other ideas?
Those need JavaScript enabled to error messages little suggestions in Github...davidnaafs wrote:I can succesfully ping my host, and as far as I can tell, (I'm not really an expert) my site isn't .htaccess password protected... Still no clue as to how I can get this fixed.. Thanks though! Any other ideas?
Last edited by pm-netti on Wed Nov 26, 2014 3:43 am, edited 1 time in total.
Thanks for your reply, but what do you mean? Is this a suggestion for a solution to my problem? It's not clear to me what your suggestion is...
Thanks.
Thanks.
Other option:davidnaafs wrote:Thanks for your reply, but what do you mean? Is this a suggestion for a solution to my problem? It's not clear to me what your suggestion is...
Thanks.
Open Admin > Settings > Users > API
Add API User.
pm-netti wrote:Other option:davidnaafs wrote:Thanks for your reply, but what do you mean? Is this a suggestion for a solution to my problem? It's not clear to me what your suggestion is...
Thanks.
Open Admin > Settings > Users > API
Add API User.
Hi, thanks!! I have an API user set up, that doesn't work either. I wanted to try your other code suggestions, but you have edited them out of your reply?
Indeed, I removed the repair proposal.davidnaafs wrote:pm-netti wrote:Other option:davidnaafs wrote:Thanks for your reply, but what do you mean? Is this a suggestion for a solution to my problem? It's not clear to me what your suggestion is...
Thanks.
Open Admin > Settings > Users > API
Add API User.
Hi, thanks!! I have an API user set up, that doesn't work either. I wanted to try your other code suggestions, but you have edited them out of your reply?
I immediately realized that the API user is mandatory (I thought it would be an option)
Last edited by pm-netti on Sat Nov 29, 2014 6:12 pm, edited 1 time in total.
Ok thanks, so I've edited view/template/sale/order_form.tpl according to this thread and made sure (again) that I have an API user set up, I logged out and in and placed a new order. Still the same error... Other people seem to have this working, I just can't figure out what is wrong. Very frustrating...pm-netti wrote: Indeed, I removed the repair proposal.
I immediately realized that the API user is mandatory (I thought it would be an option)
In file view/template/sale/order_form.tpl is bug:
http://forum.opencart.com/viewtopic.php ... 87#p529087
Have you removed the API between the user and then added it again? If so, it will function causing the error.davidnaafs wrote:Ok thanks, so I've edited view/template/sale/order_form.tpl according to this thread and made sure (again) that I have an API user set up, I logged out and in and placed a new order. Still the same error... Other people seem to have this working, I just can't figure out what is wrong. Very frustrating...pm-netti wrote: Indeed, I removed the repair proposal.
I immediately realized that the API user is mandatory (I thought it would be an option)
In file view/template/sale/order_form.tpl is bug:
http://forum.opencart.com/viewtopic.php ... 87#p529087
In 'api' table column 'api_id' must be '1'. (Same as config_api_id in table 'setting'). This is designed for a slightly tricky
Ps. file view/template/sale/order_form.tpl no need to change.
Hello.pm-netti wrote:Have you removed the API between the user and then added it again? If so, it will function causing the error.davidnaafs wrote:Ok thanks, so I've edited view/template/sale/order_form.tpl according to this thread and made sure (again) that I have an API user set up, I logged out and in and placed a new order. Still the same error... Other people seem to have this working, I just can't figure out what is wrong. Very frustrating...pm-netti wrote: Indeed, I removed the repair proposal.
I immediately realized that the API user is mandatory (I thought it would be an option)
In file view/template/sale/order_form.tpl is bug:
http://forum.opencart.com/viewtopic.php ... 87#p529087
In 'api' table column 'api_id' must be '1'. (Same as config_api_id in table 'setting'). This is designed for a slightly tricky
Ps. file view/template/sale/order_form.tpl no need to change.
I use apache as backend and nginx as frontend.
I get same error without "API user" in System -> Settings. Then In Iceweasel:
Code: Select all
SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
OK
Code: Select all
SyntaxError: Unexpected end of input
OK
In apache error_log no info, no PHP error logged, - without any log except nginx_log:
Code: Select all
2014/11/30 14:17:15 [error] 30172#0: *34 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 97.132.187.59, server: pinetka.org, request: "GET /admin/index.php?route=sale/order/delete&token=71ee04b5d75327906ec5cc3e48a5783a&order_id=15 HTTP/1.1", upstream: "http://127.0.0.1:81/admin/index.php?route=sale/order/delete&token=71ee04b5d75327906ec5cc3e48a5783a&order_id=15", host: "www.pinetka.org", referrer: "http://www.pinetka.org/admin/index.php?route=sale/order&token=71ee04b5d75327906ec5cc3e48a5783a"
2014/11/30 14:17:15 [error] 30172#0: *36 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 93.170.128.114, server: pinetka.org, request: "POST /index.php?route=api/login HTTP/1.1", upstream: "http://127.0.0.1:81/index.php?route=api/login", host: "www.pinetka.org"
Hi and thanks for helping
i really appreciate it
I just checked on my api table and the api id is already 1
Bellow is the exact error i m getting when i m trying to edit a order:
SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
OK
i really appreciate it
I just checked on my api table and the api id is already 1
Bellow is the exact error i m getting when i m trying to edit a order:
SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
OK
alsopm-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'
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!?!I just checked on my api table and the api id is already 1
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
hemorrhoids
Clean setting table:shamanit wrote:alsopm-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'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!?!I just checked on my api table and the api id is already 1
if remove API user or remove API key, then get:Otherwise frontend server (nginx) response HTTP "504 Gateway Time-out"...Code: Select all
SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data OK
hemorrhoids
http://forum.opencart.com/viewtopic.php ... 97#p530417
And add settings config_processing_status and config_complete_status
Who is online
Users browsing this forum: No registered users and 216 guests