Post by dragos_mihai » Sat Sep 19, 2020 1:26 am

Hi, i have this problem every time I enter from the admin page into clients order (only here it appears). The worst thing is that i can't update the order status because this error appears: Syntax Error: Unexpected token in JSON at position 0 error
Opencart version is 2.2.0.0

Please help me, i have 3 month trying to fix it without succes.
I attached ss with the entire error.

Attachments

Captură de ecran din 2020-09-18 la 19.17.25.jpg

Captură de ecran din 2020-09-18 la 19.17.25.jpg (102.01 KiB) Viewed 805 times

Captură de ecran din 2020-09-18 la 19.17.15.jpg

Captură de ecran din 2020-09-18 la 19.17.15.jpg (86.38 KiB) Viewed 805 times

Captură de ecran din 2020-09-18 la 19.16.59.jpg

Captură de ecran din 2020-09-18 la 19.16.59.jpg (74.49 KiB) Viewed 805 times


Newbie

Posts

Joined
Sat Sep 19, 2020 12:12 am

Post by OSWorX » Sat Sep 19, 2020 11:16 am

In that OC Version was something wrong - as fas as I can remember myself.
Was something about shipping, or payments - but could be also something other - too long ago ..
Have you checked already the permissions (for each extension) and also the API user and access, and finally the IP-Access?

Custom Development | Individuelle Entwicklung | Support & Bugfixes

Image Image Image


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by thekrotek » Sat Sep 19, 2020 3:15 pm

Check your error logs for the actual error.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by OSWorX » Sun Sep 20, 2020 1:27 am

thekrotek wrote:
Sat Sep 19, 2020 3:15 pm
Check your error logs for the actual error.
And open the developer console in your Browser > F12
There you will see which file and action is called - that may help you to find out more ..
If you are not able to find and solve that issue, you should either post a message here in the "Commercial Forum" to hire a professional or hire the developer you trust.

Custom Development | Individuelle Entwicklung | Support & Bugfixes

Image Image Image


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by dragos_mihai » Sun Sep 20, 2020 3:48 am

OSWorX wrote:
Sat Sep 19, 2020 11:16 am
In that OC Version was something wrong - as fas as I can remember myself.
Was something about shipping, or payments - but could be also something other - too long ago ..
Have you checked already the permissions (for each extension) and also the API user and access, and finally the IP-Access?
I didn't because this problem appeared after i changed into https. Until then everything was good

I checked the error log but it's empty

Newbie

Posts

Joined
Sat Sep 19, 2020 12:12 am

Post by thekrotek » Sun Sep 20, 2020 4:12 am

dragos_mihai wrote:
Sun Sep 20, 2020 3:48 am
I checked the error log but it's empty
Check your config.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by OSWorX » Sun Sep 20, 2020 4:22 am

dragos_mihai wrote:
Sun Sep 20, 2020 3:48 am
I didn't because this problem appeared after i changed into https. Until then everything was good
Fine!
One more reason why to read this BEFORE posting: viewtopic.php?f=176&t=200480

Custom Development | Individuelle Entwicklung | Support & Bugfixes

Image Image Image


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by dragos_mihai » Sun Sep 20, 2020 4:26 am

OSWorX wrote:
Sun Sep 20, 2020 1:27 am
thekrotek wrote:
Sat Sep 19, 2020 3:15 pm
Check your error logs for the actual error.
And open the developer console in your Browser > F12
There you will see which file and action is called - that may help you to find out more ..
If you are not able to find and solve that issue, you should either post a message here in the "Commercial Forum" to hire a professional or hire the developer you trust.
I looked where you told me and i found the document which contains the error text. I posted ss with index.php if is there anything wrong

Attachments

Captură de ecran din 2020-09-19 la 23.23.01.jpg

Captură de ecran din 2020-09-19 la 23.23.01.jpg (125.7 KiB) Viewed 704 times

Captură de ecran din 2020-09-19 la 23.22.40.jpg

Captură de ecran din 2020-09-19 la 23.22.40.jpg (794.25 KiB) Viewed 704 times


Newbie

Posts

Joined
Sat Sep 19, 2020 12:12 am

Post by dragos_mihai » Sun Sep 20, 2020 4:30 am

thekrotek wrote:
Sun Sep 20, 2020 4:12 am
dragos_mihai wrote:
Sun Sep 20, 2020 3:48 am
I checked the error log but it's empty
Check your config.
This is how my config code looks

Code: Select all

<?php
// HTTP
define('HTTP_SERVER', 'http://retrovag.ro/admin/');
define('HTTP_CATALOG', 'http://retrovag.ro/');

// HTTPS
define('HTTPS_SERVER', 'https://retrovag.ro/admin/');
define('HTTPS_CATALOG', 'https://retrovag.ro/');

// DIR
define('DIR_APPLICATION', '/home/retrovag/public_html/admin/');
define('DIR_SYSTEM', '/home/retrovag/public_html/system/');
define('DIR_IMAGE', '/home/retrovag/public_html/image/');
define('DIR_LANGUAGE', '/home/retrovag/public_html/admin/language/');
define('DIR_TEMPLATE', '/home/retrovag/public_html/admin/view/template/');
define('DIR_CONFIG', '/home/retrovag/public_html/system/config/');
define('DIR_CACHE', '/home/retrovag/public_html/system/storage/cache/');
define('DIR_DOWNLOAD', '/home/retrovag/public_html/system/storage/download/');
define('DIR_LOGS', '/home/retrovag/public_html/system/storage/logs/');
define('DIR_MODIFICATION', '/home/retrovag/public_html/system/storage/modification/');
define('DIR_UPLOAD', '/home/retrovag/public_html/system/storage/upload/');
define('DIR_CATALOG', '/home/retrovag/public_html/catalog/');

Newbie

Posts

Joined
Sat Sep 19, 2020 12:12 am

Post by OSWorX » Sun Sep 20, 2020 4:31 am

Not the output of the source.
Content of the "Console" - there you will see which file and action is called before the message comes back.

Custom Development | Individuelle Entwicklung | Support & Bugfixes

Image Image Image


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by dragos_mihai » Sun Sep 20, 2020 6:04 am

after i refresh the page with the error it shows me this link which forwards me into "sources". There is the index.php that i showed earlier.

Attachments

Captură de ecran din 2020-09-20 la 01.00.38.jpg

Captură de ecran din 2020-09-20 la 01.00.38.jpg (171.66 KiB) Viewed 670 times


Newbie

Posts

Joined
Sat Sep 19, 2020 12:12 am

Post by OSWorX » Sun Sep 20, 2020 6:28 am

Again wrong.

First, you wrote that you have changed to https.
These days a website without https is nothing, a webshop useless - therefore late but done now.

Second: did you try it also with that:

Code: Select all

define('HTTP_SERVER', 'https://retrovag.ro/admin/');
define('HTTP_CATALOG', 'https://retrovag.ro/');
https everywhere.

Third: you wrote in your first post:
i have this problem every time I enter from the admin page into clients order (only here it appears). The worst thing is that i can't update the order status because this error appears: Syntax Error: Unexpected token in JSON at position 0 error
Opencart version is 2.2.0.0
That means, a call via ajax is made to frontend controller by the API.
Have you checked also if the admin API is set correct?

And finally - as already written - some of the extensions (standard) shipping or payments had some bugs in 2.2.0.0
Which paymetn and shipping are assingned to these orders?

Last: before this here is growing to a "never ending story", either you can fix that by yourself, or hire a developer.
A OpenCart Professional can fix that within 5 minutes.

Custom Development | Individuelle Entwicklung | Support & Bugfixes

Image Image Image


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by by mona » Sun Sep 20, 2020 6:35 am

Dear dragos_mihai,
OSWorX wrote:
Sun Sep 20, 2020 6:28 am
hire a developer
Please take some independent advice, I do not gain anything from giving it. You are out of your depth, take him up on the offer, it is good advice.
Kind Regards,

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


Spinning Social : Links : Menus : Payments : Socials : Ads : Screen Backgrounds : Galleries : Headers : Banners : Promos


Active Member

Posts

Joined
Mon Jun 10, 2019 9:31 am
Who is online

Users browsing this forum: No registered users and 28 guests