Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

css files do not load using xstyle/css! in Chrome Beta, Dev, and Canary Channels #552

Closed
tmcgee opened this issue Apr 30, 2016 · 4 comments
Assignees
Labels
Milestone

Comments

@tmcgee
Copy link
Member

tmcgee commented Apr 30, 2016

Issue

css files do not load at all when using xstyle/css! in Chrome Beta, Dev and Canary Channels. Right now this probably affects only a small group, mostly developers however, this may soon could become a BIG problem for most Chrome users very soon when the Stable Channel moves to Version 51.

Impact

CMV application will not load at all. The error visible in the console is:

ReferenceError: normal is not defined

Affected Browser Versions

I tested using these versions of Chrome on Windows 10 (2 different computers):

  • Beta Channel
    • Version 51.0.2704.22
    • Version 51.0.2704.29 beta-m (64-bit)
    • Version 51.0.2704.29
  • Dev Channel
    • Version 52.0.2716.19
  • Canary Channel
    • Version 52.0.2720.0 canary (64-bit)

I tested using these versions of Chrome on Windows 7 (1 computer):

  • Beta Channel
    • Version 51.0.2704.29
  • Dev Channel
    • Version 52.0.2716.0

Stable Channel is not affected

The error does not occur when using the current Chrome Stable Channel:

  • Version 50.0.2661.94 (64-bit) (Windows 10)
  • Version 50.0.2661.94 (Windows 10)
  • Version 50.0.2661.94 (Windows 7)
  • Version 50.0.2661.75 m (Windows 7)

Other Windows Browsers are not affected

The error does not occur with Firefox, Internet Explorer 11 or Microsoft Edge. I did not check older version of IE, Safari or other browsers.

Other Platforms?

I did not check this on other PC platforms or Mobile

Cause:

CMV uses xstyle that is shipped with the ArcGIS JavaScript API. As of version 3.16 of the API, this is xstyle version 0.1.3. This version has been included since version 3.8 of the API and is 3 years old.

Using the most recently tagged version of xstyle (v 0.3.1, December 2014) from the xstyle repo does not resolve the issue.

xstyle is not included with the build for the pending JavaScript API version 4.0 so we will want to use a different version going forward.

Using a local build or loading the latest version from the current master branch does work.

Resolution:

Add xstyle to your packages array in dojoConfig:

{
    name: 'xstyle',
    main: 'css',
    location: 'https://cdn.rawgit.com/kriszyp/xstyle/master'
}

If you are using cmv versions 1.3.4 or earlier, dojoConfig is found in index.html.

If you are working with the current CMV develop branch in this repo, the dojoConfig is in the app.js.

Going forward

I will be submitting a PR to fix this in the develop branch.

We may want to accelerate the release of CMV version 1.4.0 or consider a hot patch for the master branch.

Pinging @DavidSpriggs so you are aware...

@tmcgee tmcgee self-assigned this Apr 30, 2016
@tmcgee tmcgee added the bug label Apr 30, 2016
@tmcgee tmcgee added this to the v1.4.0 milestone Apr 30, 2016
@tmcgee
Copy link
Member Author

tmcgee commented Apr 30, 2016

Here's the commit in the xstyle repo which address this issue over a year ago.

@cmccullough2
Copy link

Curious, I have tried to connect to the xstyle urls in this viewer. However, I keep getting a 404 error message. Will the xstyle work? https://cdn.rawgit.com/kriszyp/put-selector/v0.3.6, https://cdn.rawgit.com/kriszyp/xstyle/v0.3.2. Will I have to download the library locally?

@tmcgee
Copy link
Member Author

tmcgee commented Jun 14, 2016

@cmccullough2 You will get 404 errors if you use just those urls that you listed. That is just the path to the package. The file that is loaded is determined by the associated main property in the package array. For example, the actual JavaScript for xstyle loads from this url: https://cdn.rawgit.com/kriszyp/xstyle/v0.3.2/css.js

@cmccullough2
Copy link

Thank you, this was very helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants