Just A Quick And Dirty Yes Or No On The Debugging Issue

Please anyway feel free to respond.

If you encounter an issue of say an Syntax error / JSON ...

The first thing to do is enable the developer mode in the config.local.php file or the config.php file in the root of the store.

Second is to check the error_log file.

True or False ?

Most do not have access and/or know how to access error log files so the easiest way for them to retrieve errors is by using the tools provided by CSC.

So really there is no True or False answer to your question.

Most do not have access and/or know how to access error log files so the easiest way for them to retrieve errors is by using the tools provided by CSC.

So really there is no True or False answer to your question.

Could you elaborate on those tools you are alluding to ?

The error_log on my cPanel environment is in the root of the store so it is quite retrievable via FTP{ or through the file manager.

For the situation describe (an error notification of a syntax/json error)....

This might not be in the error_log nor will it be displayed any further from DEVELOPMENT mode.

Given that this is a Javascript symptom, the best way to diagnose it is via the browser inspector/debugger. Generally the syntax error will be shown in the console and then you can click it to find the source code. The syntax error could be the result of a php notification. Many times this will be because you have ini_set('display_errors', true) turned on so a php issue (which will also be in the error_log) will have been output to the data stream and will show up in the 'response' area of the particular http request that is generating the error.

The error_log on my cPanel environment is in the root of the store so it is quite retrievable via FTP{ or through the file manager.

For the situation describe (an error notification of a syntax/json error)....

This might not be in the error_log nor will it be displayed any further from DEVELOPMENT mode.

Given that this is a Javascript symptom, the best way to diagnose it is via the browser inspector/debugger. Generally the syntax error will be shown in the console and then you can click it to find the source code. The syntax error could be the result of a php notification. Many times this will be because you have ini_set('display_errors', true) turned on so a php issue (which will also be in the error_log) will have been output to the data stream and will show up in the 'response' area of the particular http request that is generating the error.

Tony

The developer debugging console in for instance Firefox Developer Edition does not reveal anything of this incase of this JSON error.

That is why posted this question here. I am no step further in finding the root cause of my problem.

Did you look at the network tab and the Response to the last request? JSON "data" errors won't show in the console unless they are syntactically incorrect. Hence you need to look at the response data. My guess is you have error info coming back in the response and the JS json parser in cs-cart is not handling it.

Did you look at the network tab and the Response to the last request? JSON "data" errors won't show in the console unless they are syntactically incorrect. Hence you need to look at the response data. My guess is you have error info coming back in the response and the JS json parser in cs-cart is not handling it.

The network tab ? What does that have to do with it? Listen I am the laymen here trying to resolve my issue finding the root cause of my headaches.

The issue by the way is only occurring in the product detail page while I try to add a certain product to the cart and while I add that same product to the cart within the quick view of the store.

I have setup a development store which is a full clone with exact the same addons enabled and disabled, same database and products which does not have this issue.

So I am very curious what to look for in that network tab. I do not see an error there but I could be looking at it from a wrong angle.

Your input always greatly appreciated as always.

http://prntscr.com/ezv4bi

The network tab ? What does that have to do with it? Listen I am the laymen here trying to resolve my issue finding the root cause of my headaches.

So I am very curious what to look for in that network tab. Could you be more instructive on what to expect / look for ?

Well you did say you appreciate help, but your tone is very poor!!!!!!!

Most people on here help for free in their own time, sorry but if I was tbirnseth I would be out of here!

Well you did say you appreciate help, but your tone is very poor!!!!!!!

Most people on here help for free in their own time, sorry but if I was tbirnseth I would be out of here!

In what way BarryH is my toon very poor ??

I do appreciate very much any help for free I can get. By the way I do not owe you an apology nor an explaination of any sort.

And I am always open for paid help if anyone really can help me out and as I learn a will try go give back to this community so please stop with your moral outrage towards me.

In what way BarryH is my toon very poor ??

I do appreciate very much any help for free I can get. By the way I do not owe you an apology nor an explaination of any sort.

And I am always open for paid help if anyone really can help me out and as I learn a will try go give back to this community so please stop with your moral outrage towards me.

IT'S BarryH.

Yes it's free.

You owe me nothing!

Explain what?

No moral outrage, just simple, please's, thank you's and be happy people respond.

It would be nice if you thanked in advance or even said PLEASE can you help!!!!!!!

BarryH

Enough about that bullcrap BarryH.

I am very very grateful all the help I received from many of the contributors here in on this CS Cart Community Forum. If I have not been so explicit in thanking everyone.. I am sorry. Can we get back on topic?

Thanks Barry.

In the network tab of a browser inspector (varies slightly by browser), you will see all the "requests" being placed.

If you click on the specific "request", you should see some tabs that are labeled "Request", "Response", "Preview", etc.

Click on the Response tab and look at the responses. One of them will show you the actual content of the response. If it has a PHP error in it, then that will confuse the JSON parser in the JS that has been loaded into your browser. And that PHP error (or exception) will also point you to the problem.

Can't give you a real clear step by step because each step might lead to a different symptom.

Thanks Tony for the follow up.

I followed your instructions as best as I know how but it did not reveal a PHP error

See screenshot which is a result of me trying to add this product to the cart which it did but not without triggering a JSON.

[attachment=12325:Screenshot_json.jpg]

At any rate I do not have the time and skill set to really find the bug, it simply occurs in this product store and not in the cloned development store.

Right now I am working from a clean sheet that is to say I building up a new CS Cart installation with the database of the production store and try to put in the addon's one by one to avoid a JSON.

I have done so in a directory of the live production store but for some very odd reason I cannot add new addon s any more to this development store.

[attachment=12326:Screen Shot 2017-04-25 at 20.23.52-fullpage.png]

Screenshot_json.jpg

Screen Shot 2017-04-25 at 20.23.52-fullpage.png

I can't read the error message displayed in your image.

If you don't see the '+' icon on the addons.manage page, then the account you are logged into is either not an is_root=Y account or you are not in the "All stores" area.