Troubleshooting Your Website

This topic applies to

Applies to

SuiteCommerce Web Stores

It is important to test your web site on various browsers to ensure that the content displays correctly. It is also important that you verify the site is working as you expect using the SEO page generator. Note that the SEO page generator is a headless browser, used to expose product URLs on your web site to search bots. For site compatibility testing, you should consider the SEO page generator as you do any other web browser, such as Internet Explorer, Chrome, Firefox and others. You can use the logging mechanisms included in the SEO page generator to help troubleshoot problems you may find while testing.

Note

The following procedures are for testing your site on a public domain. You cannot view the web site on a local host environment when JavaScript is disabled.


Testing Your Web Site

  1. Turn off JavaScript in the browser. Refer to instructions for the browser you are working with. The following instructions are for Chrome:

    1. Click the Chrome Menu on the browser toolbar

    2. Click Settings.

    3. Click Show advanced settings...

    4. Under Privacy, click Content Settings.

    5. Under JavaScript, choose Do not allow any site to run JavaScript.

    6. Click Done.

  2. Go to your site home page, for example, http://www.mywebstore.com.

  3. Refresh the home page. You should see an error indicating that JavaScript is disabled. This is expected.

You should be able to navigate all the pages of your site, and view text and images. To test your web site, click through the links on your web site to verify that all the content is rendered as you expect.

Using the SEO Page Generator for Troubleshooting

  1. Ensure that JavaScript has been turned off in the browser you are using. Follow instructions in Testing Your Web Site.

  2. Right Click to select View Source in the browser.

  3. Modify the URL on the page displaying the source code. Append ?seodebug=T to the URL. For example:

    http://www.mywebstore.com/?seodebug=T
    http://www.mywebstore.com/Salida-Backpack?seodebug=T
  4. Scroll down towards the bottom of the source code. Here you can see a log provided by the SEO page generator. The log includes all the requests for that page that the SEO page generator produced. Header information, caching and other information is also included. Note the following log snippet:

    [05:49:30.678] [ 28894 kb ] [ +2187 ms ] [ +17285 kb ]    TypeError: Object #<Object> has no method 'close'
    [05:49:30.679] [ 28935 kb ] [    +1 ms ] [   +41 kb ]    TypeError: Object #<Object> has no method 'close'
    [05:49:30.681] [ 28961 kb ] [    +2 ms ] [   +26 kb ]    TypeError: Object #<Object> has no method 'close'
    [05:49:30.681] [ 28976 kb ] [    +0 ms ] [   +15 kb ]    TypeError: Object #<Object> has no method 'close'
    [05:49:30.682] [ 28994 kb ] [    +1 ms ] [   +18 kb ] Envjs.Platform.HTML INFO:  [Tue, 29 Nov 2016 13:49:30 GMT:682] parsing document for window exchange  undefined
    [05:49:30.682] [ 28998 kb ] [    +0 ms ] [    +4 kb ] Envjs.Parser.HTMLParser INFO:  [Tue, 29 Nov 2016 13:49:30 GMT:682] parseDocument  0
    [05:49:30.684] [ 28466 kb ] [    +2 ms ] [  -532 kb ] Envjs.Platform.HTML INFO:  [Tue, 29 Nov 2016 13:49:30 GMT:684] finsihed parsing document for window exchange  undefined
    [05:49:30.689] [ 28469 kb ] [    +5 ms ] [    +3 kb ] Envjs.Platform.HTML INFO:  [Tue, 29 Nov 2016 13:49:30 GMT:688] frame  undefined
    [05:49:30.691] [ 28577 kb ] [    +2 ms ] [  +108 kb ]    TypeError: Object #<Object> has no method 'close'
    [05:49:30.711] [ 28722 kb ] [   +20 ms ] [  +145 kb ] Envjs.Parser.HTMLParser INFO:  [Tue, 29 Nov 2016 13:49:30 GMT:710] from parse start to after document ready in  0.027
    [05:49:30.717] [ 28762 kb ] [    +6 ms ] [   +40 kb ] Envjs.Parser.HTMLParser INFO:  [Tue, 29 Nov 2016 13:49:30 GMT:717] from parse start to after document ready in  2.621
    [05:49:30.718] [ 28767 kb ] [    +1 ms ] [    +5 kb ] Envjs.Core WARN:  [Tue, 29 Nov 2016 13:49:30 GMT:718] ready to exit warming  false  eventQueue  0  connections  0  timers  1
    [05:49:30.718] [ 28770 kb ] [    +0 ms ] [    +3 kb ] Envjs.Core INFO:  [Tue, 29 Nov 2016 13:49:30 GMT:718] event loop is passive, exiting
    [05:49:30.724] [ 28776 kb ] [    +6 ms ] [    +6 kb ] Envjs.Core INFO:  [Tue, 29 Nov 2016 13:49:30 GMT:724] exiting
    [05:49:30.724] [ 28779 kb ] [    +0 ms ] [    +3 kb ] Envjs.Jav8 DEBUG:  [Tue, 29 Nov 2016 13:49:30 GMT:724] Envjs.exit()
    [05:49:30.753] [ 28801 kb ] [   +29 ms ] [   +22 kb ] Envjs.Jav8 DEBUG:  [Tue, 29 Nov 2016 13:49:30 GMT:752] getCompletedHtml()
    [05:49:30.772] [ 29285 kb ] [   +19 ms ] [  +484 kb ] Envjs.Core WARN:  [Tue, 29 Nov 2016 13:49:30 GMT:772] ready to exit warming  false  eventQueue  0  connections  0  timers  1
    [05:49:30.773] [ 29288 kb ] [    +1 ms ] [    +3 kb ] Envjs.Core INFO:  [Tue, 29 Nov 2016 13:49:30 GMT:773] event loop is passive, exiting
    [05:49:30.777] [ 29291 kb ] [    +4 ms ] [    +3 kb ] evaluatePage end
    
    [05:49:31.811] [    +1 ms ] Source URL: 'http://www.mywebstore.com/?seodebug=T'; Time [ms]: 2779; Perf info: wallTime [ms]: 2726 threadCpuTime [ms]: 2446 maxUsedMem [kb]: 29293 finalUsedMem [kb]: 29293 finalFreeMem [kb]: 69010 finalHeapSize [kb]: 39313 memLimit [kb]: 98304

    If the web site page view that you are investigating was served from the CDN cache, the entire debug log is not displayed. In this case, you may see truncated output. Note the following log snippet:

    <!-- Parameter from url: seodebug=T:
    [05:49:31.811] [    2 ms ] SEO generator page taken from cache: Cached response: {compId, entryType, siteId, url, compression} { 3925062, SEO_GENERATED_RESPONSE, 3, http://www.mywebstore.com/search?seodebug=T, true}
    -->

Generating the Debug Log when a Page View is Served from Cache

  1. Go back to the page displayed on your site.

  2. Add a meaningless parameter to the page view URL. The intention here is to give the browser the illusion that it is loading the page for the first time. For example:

    http://www.mywebstore.com/Salida-Backpack?seodebug=T&abcd=1
  3. View page source.

  4. Scroll toward the bottom of the page source code.

The debug log displays in the page source code. Note that a second request to the same URL is served from CDN cache.

Finding Errors

To find errors, search the page displaying the source code. Press Ctrl+F, and then type error into the search box that displays in the browser.

Note

Note that the SEO page generator log may not be fully compatible with Chrome or Firefox. You might find false errors that are logged in the SEO page generator, but not apparent in the browser.


Guidelines for Finding Errors

  • Best Practice: Web developers can use console.log in Reference Implementation customizations to verify that code is being executed properly. Typically, console.log is used to log a message to the JavaScript console in the browser, but the output is also included in the SEO debug log displayed in view-source mode. By using console.log web developers can see the code that is being executed, and track customizations.

  • JavaScript files that are improperly referenced return Internal Error 500 in the debug log. When you reference a JavaScript file, NetSuite recommends that you include the URL root in the path. Note that spaces in file names cause errors. Use the following format to create a link or cross reference: domain/url_root/file_path. Note the following examples:

    Correct

    http://www.mywebstore.com/ShopFlow/js/custom/tracking-footer.js

    Incorrect

    http://www.mywebstore.com/ShopFlow/js/custom/tracking footer.js