Map showing up as a checkerboard

User Help for Mozilla Firefox
Post Reply
ajsdad
Posts: 5
Joined: November 26th, 2021, 10:54 am

Map showing up as a checkerboard

Post by ajsdad »

Trying to log onto a site that used to work. It contains a map which I think is a SVG. It appears as a checkerboard instead of a continuous map. Nothing I have changed has cleared it up. Switching to MS Edge displays the map correctly. I have changed the SVG Content Type to "use Windows default" and in addition changed the default app for .svg with zero results. I have tried this on two different computers and no joy. Checked the knowledge base for map help with no results. if any of you would like to try for yourself, go to: https://apps.dhec.sc.gov/Environment/FoodGrades/ and then click on "Map Search" in the blue box. Any help would be appreciated. Tnx AJSDAD
morat
Posts: 6421
Joined: February 3rd, 2009, 6:29 pm

Re: Map showing up as a checkerboard

Post by morat »

I get two CSP errors in the console.
Content Security Policy: The page’s settings blocked the loading of a resource at https://js.arcgis.com/3.16/esri/css/esri.css (“style-src”).
Content Security Policy: The page’s settings blocked the loading of a resource at https://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css (“style-src”).
Try setting the security.csp.enable preference to false in the about:config page, then reload the map search page.

Do not turn off CSP permanently, only temporarily as a test.

Content Security Policy
http://en.wikipedia.org/wiki/Content_Security_Policy
http://content-security-policy.com/

Firefox 94.0.2
Windows 10 Pro 20H2 32-bit
ajsdad
Posts: 5
Joined: November 26th, 2021, 10:54 am

Re: Map showing up as a checkerboard

Post by ajsdad »

morat wrote:I get two CSP errors in the console.
Content Security Policy: The page’s settings blocked the loading of a resource at https://js.arcgis.com/3.16/esri/css/esri.css (“style-src”).
Content Security Policy: The page’s settings blocked the loading of a resource at https://code.jquery.com/ui/1.10.4/theme ... ery-ui.css (“style-src”).
Try setting the security.csp.enable preference to false in the about:config page, then reload the map search page.

Do not turn off CSP permanently, only temporarily as a test.

Content Security Policy
http://en.wikipedia.org/wiki/Content_Security_Policy
http://content-security-policy.com/

Firefox 94.0.2
Windows 10 Pro 20H2 32-bit
Hi morat - Your test suggestion worked. The entire map was visible. Does any workaround come to mind? Tnx, AJSDAD
morat
Posts: 6421
Joined: February 3rd, 2009, 6:29 pm

Re: Map showing up as a checkerboard

Post by morat »

You could load the css files using a userscript.

Code: Select all

// ==UserScript==
// @name         SC Food Grades
// @match        https://gis.dhec.sc.gov/foodgrades/
// @resource     IMPORTED_CSS_ONE https://js.arcgis.com/3.16/esri/css/esri.css
// @resource     IMPORTED_CSS_TWO https://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css
// @grant        GM_getResourceText
// @grant        GM_addStyle
// ==/UserScript==

(function () {

  "use strict";

  var styleOne = GM_getResourceText("IMPORTED_CSS_ONE");
  var styleTwo = GM_getResourceText("IMPORTED_CSS_TWO");
  GM_addStyle(styleOne);
  GM_addStyle(styleTwo);

})();
Tampermonkey
http://addons.mozilla.org/firefox/addon/683490
http://www.tampermonkey.net/documentation.php
Last edited by morat on November 27th, 2021, 10:36 am, edited 2 times in total.
ajsdad
Posts: 5
Joined: November 26th, 2021, 10:54 am

Re: Map showing up as a checkerboard

Post by ajsdad »

Hi morat - Thanks so much. I'll give this a try. R/ajsdad
ajsdad
Posts: 5
Joined: November 26th, 2021, 10:54 am

Re: Map showing up as a checkerboard

Post by ajsdad »

Hi morat - no joy with the addition to my css file. Not worth the effort to continue with this. Thanks for your help. R/ajsdad
morat
Posts: 6421
Joined: February 3rd, 2009, 6:29 pm

Re: Map showing up as a checkerboard

Post by morat »

You're welcome.

The userscript works for me, except the popup isn't styled correctly.
TheVisitor
Posts: 5472
Joined: May 13th, 2012, 10:43 am

Re: Map showing up as a checkerboard

Post by TheVisitor »

I should point out that Edge/Chrome renders the site just fine, no blocks/cubes. I can also verify that turning off CSP 'fixes' the issue, but is highly NOT Recommended.

Tested on latest Nightly build...
Post Reply