CMS Development

riken
Member | Partner
Member | Partner

Google Mobile Friendly Error

How to resolve the following issue which I am getting on Google Mobile-Friendly Test?

 

err.png

 

Thanks

0 Upvotes
4 Replies 4
jlamb2
Contributor

Google Mobile Friendly Error

In the bottom of this page/template you've added some javascript:

 

$(window).bind("load", function() {
	$(function() {
		$("a").attr('href', function(i, h) {
			h= h + (h.indexOf('?') != -1 ? "&" + utm_parameter1 : "?" + utm_parameter1);
			return h;
		});
	});
});

This causes an error as 'indexOf' is undefined. It looks like a setup to add utm parameters to links, but it isn't working. I would either rewrite or remove that.

0 Upvotes
riken
Member | Partner
Member | Partner

Google Mobile Friendly Error

I know about this but I am looking for first 4 error not last one.

 

Thanks

0 Upvotes
jlamb2
Contributor

Google Mobile Friendly Error

The other errors are CORS and Content Security Policies blocking some resources from loading. 

 

I'm not sure what page you are seeing that error on, but if it's an externally hosted site you'll need to modify those records to allow access. If it's hosted in HubSpot, you cannot edit these and would have to instead remove the offending content. The upgrade insecure requests is an nginx setting to force https 

0 Upvotes
riken
Member | Partner
Member | Partner

Google Mobile Friendly Error

0 Upvotes