Debug loading issue - magento

I'm having trouble debugging an extremely strange bug.
It happens rarely, and at seemingly random places on the page.
The HTML will stop, and start loading the page again - see screenshot below:
If I reload the page then 99% of the time it works fine. We're using Magento on an nginx server but the issue also happens on my local dev box.
There are no errors generated when this happens that I can see (checked nginx, php-fpm, mysql and Magento logs).
Does anyone have any ideas on how I could debug this issue?

I think the problem is your javascript in your template or skin. When dom is ready the search filter will load their subcategory also.
You should have a look at Network tab in debug tool and check the last request is called by Ajax (XHR). Maybe it is rendering a page layout template instead of json or blank page.
Good luck

Related

Google Tag Manager causes lag in page loading

There is a 5 second or so after the page is loaded, that e.g. clicking or hovering on elements won't work.
I figured out, it has to do with the Tag Manager.
Just like suggested in the guide, it's loading asynchronously.
Does somebody have any suggestion how to avoid this lag?
GTM shouldn't cause such delays - it loads asynchronously. If you want to test it - remove GTM from the website and check page load time. You can also use WebPageTest and block GTM in the settings to prevent the script from running. Unless there are any custom HTML injections that prevent the buttons from working before all the content is loaded, it isn't GTM.
Looking at the load waterfall you should see which element blocks the page from loading.
I found out what the problem was that was issue in our implementation, not in GTM.

Obtaining updated page with HtmlUnit

After I click on specific anchor on some html page (with usual browser), a new appears on the page, what I can see with Chrome's instrumental tool. No reload of the page occur, it's just new at the end of the page. But when I click on the anchor using HtmlUnit ( HtmlPage page = anchor.click() ) it starts to reload the whole page.
So the main question is how to click on the anchor without provoking a page reload. The second question is how to obtain an updated, not reloaded page, cos' the construciton itself "HtmlPage page = ... " looks like we're about to get a new, reloaded page.
There is no way to 'click on the anchor without provoking a page reload'. There is no way in a real browser so there is also no way to do this in HtmlUnit.
If you are facing this kind of problems you can try to get this solved:
use the latest snapshot version of HtmlUnit.
use some proxy to monitor the real traffic (like Charles WebProxy). Do it for both, the real browser and HtmlUnit.
check for differences in the traffic
if you see some differences try to figure out why this happens. Usually there is a javascript function that does not work the same way as in the real browser.
if you can point to a single js problem open an issue (see Submitting Javascript bugs for more details)
(optional) provide a patch
The time to fix your issue usually depends on the amount of details you provide.

"Fetch as Google" renders all pages to look like my homepage

I am trying to figure out why my website's posts and pages such as my resume are getting a "Complete" status with a green check mark (seemingly no errors or redirects) when fetching and rendering as google, but all of them "render" and look like my homepage. The page speed insights tool seems to be using the same rendering engine as it seems to have the same issue.
Notes:
The html served from my website on initial page load is the correct HTML and content. No redirects occur. The initial page load does not fetch content via JS. I mention this because although my website is not a one page application (I'm using Wordpress), I do use ajax in combination with a post variable flag to fetch new page content when the user navigates to the next page (after the initial page load).
I have verified that all of my pages have been indexed using the "site:" trick in Google search. They are indexed properly, but they aren't "rendering" properly.
Should I be worried? Should I just ignore that the pages aren't rendering properly? It doesn't make any sense. Is anyone else having this issue?
Your resume page has a response type of content-type image/gif so google thinks that the page is an image??

Primefaces Ajax response fail randomly

I am using p:datatable and on clicking of row (Command link) I am displaying a panel. Most of the time it is working fine but in regression testing some time it is getting hanged but request is going to ManageBean fetching all the data.
But it is not rendering the panel. This error has no specific pattern. I have put log in all possible place even in phaselistner lifecycle everything looks good.
I checked in firebug response is also coming. from server
I am using weblogic 10.3.6,primefaces 3.5 and internet explorer 9.x
Try putting in a component in the page where the data table lives. This displays Ajax events and alot more. Then compare the log output for when it succeeds against the output for when it fails. This may point to DOM as was suggested or somewhere else.

Executing AJAX scripts within an AJAX response

I'm having trouble using AJAX page updates along with other AJAX scripts.
During a normal page load, the AJAX scripts (picture scrolling and picture thumbnails) work fine. But when I update a page with AJAX, these scripts (usually loaded in the header of the initial page load) stop working.
I am wondering if this is specific to these scripts and I need to look into them deeper to resolve/re-write or if I am missing something more generic in combining AJAX page updates with AJAX scripts the returned code relies on.
Embedded javascript runs fine.
Thanks for your ideas!
PS: The scripts I am using are from www.dynamicdrive.com are:
1) stepcarousel (http://www.dynamicdrive.com/dynamicindex4/stepcarousel.htm) and
23) thumbnailviewer (http://www.dynamicdrive.com/dynamicindex4/thumbnail.htm) from the
Try doing this on Firefox, using the Firebug debugger, so you can single-step through and determine what is going on with the javascript. If you are using IE8 then you can hit F12 and bring up the debugger for that environment also.
Once you have some idea what is going on then you can explain what you are seeing, what browsers you have tried and you will get more help.

Resources