CityOfBoston / boston.gov-d8

The official repository City of Boston public website, boston.gov.
https://boston.gov
Other
30 stars 20 forks source link

Search Page is Not fully loaded on newest version of IE #1457

Closed AmyWipfler closed 4 years ago

AmyWipfler commented 4 years ago

Environment (Device > OS > Browser) Computer > macOS > Safari Computer > Windows > Internet Explorer 11 Computer > Windows > Microsoft Edge

This was reproduced on 2 windows systems:

Brief Description The page does not fully load on several configurations.

Steps to reproduce 1) 00:00, Refer to: 2020 05 14, Not fully loaded, Safari will only load in Private window.mp4 2) 00:00, Open Safari in a standard window 3) 00:05, Paste in the URL to load the page a. BUG: Note that the page is not fully loaded. 4) 00:12, Open Safari in a Private window 5) 00:24, Paste in the URL to load the page a. NOTE: The page is fully loaded.

Other Comments:

Desired Result Page fully loads on all browsers.

Actual Result Some browsers do fully load the page.

AmyWipfler commented 4 years ago

Per Hugh on 6/9/20:

After investigating the issue I have discovered the following:

The Search page was working fine on IE 11.418.18362.0, but after upgrading to IE 11.836.18362.0 (via Windows Update), the page broke in the way David Wilcox describes. Ruled out, but provided for posterity: The CORS policy on the Acquia server doesn’t allow us to fetch the Developments API from a domain other than boston.gov, therefore d8-dev2.boston.gov et al. fail. This won’t be an issue on production when boston.gov is the domain from which all requests originate. Even the production site produces this same error. When disabling IE’s browser security to circumvent the CORS issue, the React app still doesn’t load due to an IE-specific JavaScript error in fleetcomponents.gk78kqoc.js. The error states:

SCRIPT28: Out of stack space fleetcomponents.gk78kqoc.js (88,44) SCRIPT2343: Stack overflow at line: 88

If the fleet-components.patterns section is commented out of bos_theme.libraries.yml in Drupal, then the app loads successfully. However this would disable the Fleet JavaScript across the entire site and as such is not a viable permanent fix. https://registry.boston.gov/birth also loads fleetcomponents.gk78kqoc.js, but does not produce the same error. Comparing the contents of this file with the file of the same name being loaded on /metrolist/search shows that they are identical. The error does not occur on /metrolist/ami-estimator fleetcomponents.gk78kqoc.js is outside of my purview, so it is not feasible for me to investigate/apply a direct fix of the code on my own. Would be something for the larger DoIT team to handle should they decide to do so. A temporary workaround would be to exclude fleetcomponents.gk78kqoc.js from the Metrolist Search page only and/or for IE 11 only.

AmyWipfler commented 4 years ago

@mmcgowanBOS Is it still possible to make a conditional exclusion of the fleetcomponents JavaScript file to resolve this issue with IE?

mmcgowanBOS commented 4 years ago

This was updated about 2 weeks ago and tested fine in dev and staging, and still works as expected there. See commit in GitHiub here. https://github.com/CityOfBoston/boston.gov-d8/commit/557d976a93b623e97eb130e375626127971a05fc#diff-983272ad5367eba525f6b1a81d46595b

It looks like the change is not taking effect in Prod. Will look more into this.

mmcgowanBOS commented 4 years ago

I made a small update to the condition in the theme file that seems to have fixed the problem. https://github.com/CityOfBoston/boston.gov-d8/commit/dd694549854d7d76c46e2a9f8baed02022edcbbd#diff-983272ad5367eba525f6b1a81d46595b

Closing for now.

AmyWipfler commented 4 years ago

@mmcgowanBOS Page is not loaded on most recent version of IE. Tested on BrowserStack this morning.

image

AmyWipfler commented 4 years ago

Also, AMI Estimator is not returning accurate values, not sure if this is related.

image

AmyWipfler commented 4 years ago

@hguiney FYI

mmcgowanBOS commented 4 years ago

OK...I stand corrected. I must have had some caching issues. Fleetpatterns.js is still showing up in Prod. I can look into it.