Post by nhucbcb » Thu Feb 26, 2015 6:49 pm

Nesster wrote: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
Hi,

Your problem is caused by:
1) Your site is Maintenance Mode. Please try disable it in In Opencart Admin, go to System >> Settings >> Edit >> Server tab >> Maintenance Mode: NO
2) Your language(new language) was error. Please try re-install the English language.
3) API user: In Opencart Admin, go to System >> Settings >> Users >> API and create a new user then go to System >> Settings >> Edit >> Option tab >> API User >> choose new API
4) Your hosting did disable the 443 port. Please try edit the file: admin/config.php
find the code:
define('HTTPS_CATALOG', 'https://yoursite.com/');
change to:
define('HTTPS_CATALOG', 'http://yoursite.com/');

change "https" to "http"

Newbie

Posts

Joined
Thu Feb 26, 2015 6:22 pm

Post by rlasmar » Tue Mar 31, 2015 1:18 pm

I finally found my problem.

In my case was the language translation.

When in english everything worked, but when I changed to my language I can not edit orders.

So, I checked all files from my language translation and there's a few files in ANSI format, so I converted all to UTF-8 without BOM.

Now I can edit orders.

Newbie

Posts

Joined
Mon Nov 26, 2012 10:15 pm

Post by dancarp » Sat Apr 04, 2015 9:43 am

Please try edit the file: admin/config.php
find the code:
define('HTTPS_CATALOG', 'https://yoursite.com/');
change to:
define('HTTPS_CATALOG', 'http://yoursite.com/');

change "https" to "http"

nhucbcb

Posts: 4
Joined: Thu Feb 26, 2015 6:22 am
Thank You, finally I have fixed my edit feature as well as digital downloads and who know what other possible problems there have been.
Make the changes in both config.php files "/config.php and admin/config.php"

New member

Posts

Joined
Sun Oct 05, 2014 5:41 am

Post by Ottiko » Mon Apr 20, 2015 9:28 pm

rachidgeldi wrote:
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.
Can't help...

Newbie

Posts

Joined
Fri Apr 10, 2015 6:20 am

Post by pm-netti » Mon Apr 20, 2015 10:20 pm

Ottiko wrote: Can't help...
You try SSL to Enabled and:

http://forum.opencart.com/viewtopic.php ... 40#p553299

Image
- - - OpenCart Upgrade Service - - -


User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä-Finland

Post by gilaraujo » Mon Apr 20, 2015 11:49 pm

Worth mentioning i had a similarish issue, all attempts were tried and i figured out in the end it was because my host decided to activate me the "free" Cloudflare thing. Thanks for that host! lol

Deactivated it, all working great now

New member

Posts

Joined
Fri Mar 27, 2015 10:32 pm

Post by Ottiko » Wed Apr 22, 2015 9:49 pm

pm-netti wrote:
Ottiko wrote: Can't help...
You try SSL to Enabled and:

http://forum.opencart.com/viewtopic.php ... 40#p553299
I try, but didn't work...

Newbie

Posts

Joined
Fri Apr 10, 2015 6:20 am

Post by pm-netti » Thu Apr 23, 2015 12:44 am

Ottiko wrote:
pm-netti wrote:
Ottiko wrote: Can't help...
You try SSL to Enabled and:

http://forum.opencart.com/viewtopic.php ... 40#p553299
I try, but didn't work...
You check web hosting, is it php CURL in use.

Image
- - - OpenCart Upgrade Service - - -


User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä-Finland

Post by Ottiko » Thu Apr 23, 2015 6:19 am

cURL support: enabled :choke:

Newbie

Posts

Joined
Fri Apr 10, 2015 6:20 am

Post by pm-netti » Thu Apr 23, 2015 3:48 pm

Ottiko wrote:cURL support: enabled :choke:
How us HTTP Loopback connections?
http://forum.opencart.com/viewtopic.php ... rl#p552782
Others Curl settings?
http://curl.haxx.se/

Image
- - - OpenCart Upgrade Service - - -


User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä-Finland

Post by chilledworld » Sat Apr 25, 2015 5:24 pm

I have the same problem I cannot update the order status.
I get this error message SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data OK

I have tried changing the API without success.
Maintenance mode is off.

I changed the HTTPS to HTTP in admin/config.php and config.php
define('HTTPS_SERVER', 'http://www.mysite.com/admin/');
define('HTTPS_CATALOG', 'http://www.mysite.com/');
This worked. I changed the status on 7 orders but now it is not working again.

Any other ideas?
I have used OC since 1.4 and it has been amazing but this has got me stumped.

Newbie

Posts

Joined
Mon Jan 31, 2011 4:29 am

Post by pm-netti » Sat Apr 25, 2015 6:49 pm

chilledworld wrote:I have the same problem I cannot update the order status.
I get this error message SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data OK

I have tried changing the API without success.
Maintenance mode is off.

I changed the HTTPS to HTTP in admin/config.php and config.php
define('HTTPS_SERVER', 'http://www.mysite.com/admin/');
define('HTTPS_CATALOG', 'http://www.mysite.com/');
This worked. I changed the status on 7 orders but now it is not working again.

Any other ideas?
I have used OC since 1.4 and it has been amazing but this has got me stumped.
Is your SSL status enabled? If is, change this:

Code: Select all

define('HTTPS_SERVER', 'http://www.mysite.com/admin/');
define('HTTPS_CATALOG', 'http://www.mysite.com/');
to:

Code: Select all

define('HTTPS_SERVER', 'https://www.mysite.com/admin/');
define('HTTPS_CATALOG', 'https://www.mysite.com/');

Image
- - - OpenCart Upgrade Service - - -


User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä-Finland

Post by imdevlper18 » Sat May 16, 2015 2:24 pm

I had my store on maintenance mode. So order details were failing.
Removing from maintenance mode fixed the issue and i was able to edit the orders.

Opencart Extensions | Professional opencart support | Support Ticket | support@cartbinder.com


User avatar
Active Member

Posts

Joined
Sun May 11, 2014 2:04 pm


Post by Ottiko » Sun May 24, 2015 8:18 pm

I testing on localhost (Denwer).
I try to SSL, cURL is enable with this option http://i.imgur.com/x39sRmp.png
But bug is can't fixed... :-[

Newbie

Posts

Joined
Fri Apr 10, 2015 6:20 am

Post by nick5000 » Fri Jul 03, 2015 4:44 pm

I can't get it to work.
Have tried the "official" fix to check api id, and have made sure I have API user selected.
tried disabling mod_security
tried curl domain in SSH, it works
tried changing from https to http in admin/config.php

New member

Posts

Joined
Fri Apr 13, 2012 2:25 pm

Post by imdevlper18 » Fri Jul 03, 2015 4:48 pm

Have you checked if store is not in maintenance mode ?

Opencart Extensions | Professional opencart support | Support Ticket | support@cartbinder.com


User avatar
Active Member

Posts

Joined
Sun May 11, 2014 2:04 pm


Post by nick5000 » Fri Jul 03, 2015 6:11 pm

Yes, it's not in maintenance mode.

Php info says this, does this mean that the correct curl is enabled?

Configure Command
'./configure' '--disable-fileinfo' '--disable-pdo' '--disable-posix' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-mbstring' '--enable-sockets' '--enable-zip' '--prefix=/usr/local' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-curl=/opt/curlssl/' '--with-freetype-dir=/usr' '--with-gd' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=/usr/bin/mysql_config' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--with-zlib' '--with-zlib-dir=/usr'


curl not mentioned anywhere else

New member

Posts

Joined
Fri Apr 13, 2012 2:25 pm

Post by straightlight » Sat Jul 04, 2015 7:56 pm

After reading 3 pages on this topic, none could report if cURL support is enabled nor that could find a cURL version from phpinfo() nor stating the error logs on when and where exactly this error actually occurs when using the API under the admin orders page since it has never been asked to do so.

1 - Initiate phpinfo(), on a separate PHP file if you cannot either find it or run it under the admin section of OC. Then, execute it from browser. Do you see: cURL support set to enabled line under a table structure?

2 - Under the admin section of OC, click on the error log link below settings for v2.0x and under settings for v1.5x releases. What are the lines indicating regarding the reported issues particularly?

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Legendary Member
Online

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by nick5000 » Sun Jul 05, 2015 12:42 am

straightlight wrote:After reading 3 pages on this topic, none could report if cURL support is enabled nor that could find a cURL version from phpinfo() nor stating the error logs on when and where exactly this error actually occurs when using the API under the admin orders page since it has never been asked to do so.

1 - Initiate phpinfo(), on a separate PHP file if you cannot either find it or run it under the admin section of OC. Then, execute it from browser. Do you see: cURL support set to enabled line under a table structure?

2 - Under the admin section of OC, click on the error log link below settings for v2.0x and under settings for v1.5x releases. What are the lines indicating regarding the reported issues particularly?
Mine is:

cURL support enabled
cURL Information 7.38.0

From the error log I find:

2015-07-04 16:36:48 - PHP Notice: Undefined variable: json in /home/XXX/public_html/admin/controller/sale/order.php on line 2222

New member

Posts

Joined
Fri Apr 13, 2012 2:25 pm

Post by straightlight » Sun Jul 05, 2015 12:44 am

Great. Now, we have a bit more information regarding this problem. Which OC version are you using exactly?

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Legendary Member
Online

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 33 guests