Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

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

 
  • Mongoose
  • Senior Member
  • Members
  • Join Date: 08-Mar 13
  • 991 posts

Posted 13 March 2017 - 12:58 PM #1

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 ?

 

 


running CS Cart V4.10.3.SP1 


 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3839 posts

Posted 13 March 2017 - 01:28 PM #2

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.



 
  • Mongoose
  • Senior Member
  • Members
  • Join Date: 08-Mar 13
  • 991 posts

Posted 13 March 2017 - 08:44 PM #3

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 ?


running CS Cart V4.10.3.SP1 


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11383 posts

Posted 13 March 2017 - 11:22 PM #4

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.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • Mongoose
  • Senior Member
  • Members
  • Join Date: 08-Mar 13
  • 991 posts

Posted 23 April 2017 - 12:20 PM #5

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.


running CS Cart V4.10.3.SP1 


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11383 posts

Posted 23 April 2017 - 02:22 PM #6

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.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • Mongoose
  • Senior Member
  • Members
  • Join Date: 08-Mar 13
  • 991 posts

Posted 23 April 2017 - 03:01 PM #7

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


running CS Cart V4.10.3.SP1 


 
  • BarryH
  • Senior Member
  • Members
  • Join Date: 03-Sep 07
  • 1459 posts

Posted 23 April 2017 - 03:41 PM #8

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!


BarryH

 

CS-Cart v4.4.3 (Plus one being developed v4.5.2 SP2)
UK User


 
  • Mongoose
  • Senior Member
  • Members
  • Join Date: 08-Mar 13
  • 991 posts

Posted 23 April 2017 - 04:13 PM #9

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. 

 


running CS Cart V4.10.3.SP1 


 
  • BarryH
  • Senior Member
  • Members
  • Join Date: 03-Sep 07
  • 1459 posts

Posted 23 April 2017 - 04:32 PM #10

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


BarryH

 

CS-Cart v4.4.3 (Plus one being developed v4.5.2 SP2)
UK User


 
  • Mongoose
  • Senior Member
  • Members
  • Join Date: 08-Mar 13
  • 991 posts

Posted 23 April 2017 - 04:51 PM #11

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.


running CS Cart V4.10.3.SP1 


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11383 posts

Posted 24 April 2017 - 08:46 PM #12

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.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • Mongoose
  • Senior Member
  • Members
  • Join Date: 08-Mar 13
  • 991 posts

Posted 25 April 2017 - 06:24 PM #13

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.

 

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.

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


running CS Cart V4.10.3.SP1 


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11383 posts

Posted 25 April 2017 - 06:28 PM #14

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.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.