CityOfBoston / boston.gov-d8

The official repository City of Boston public website, boston.gov.

Home Page:https://boston.gov

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Permissions issue on JS file preventing users from opening "drawers" for filtering events and news pages

duffy-james opened this issue · comments

We're receiving reports that users are unable to open up the "drawers" on our website for filtering on our calendar listing page, public notices site, and news page. When they click on the drawer to open up filtering options, nothing happens:

image

This appears to be a permissions issue. Users are able to click and open the drawers on the City network, but users outside of the City network are unable to. @davidrkupton flagged that we're seeing a 403 error:

image

This is a high-priority ticket and should be addressed as soon as we can.

Just to clarify this is a back-end files permission issue, not a front-end user permissions issue.

Response when requesing the js file:
image

Comment

The cause of this issue is unexplained. I believe that when Drupal made the aggregated JS file the permissions for the file were set in a subtly different way to the other js files, and which is not apparent from the basic console commands. This has never happened before to boston.gov or any Drupal site I have been involved with, so I'd say its a rare and probably not replicatable event. The root cause may not even been Drupal, but rather a glitch on the AWS server itself while the file was created.

Resolution

  1. SSH onto production server
  2. manually delete the problematic js file
  3. run drush cr and drush updb
  4. clear the varnish cache

Note:
To clear the cache, can ssh onto the prod server and use:
curl -X PURGE -H "X-Acquia-Purge:boston.gov" -H "Accept-Encoding: gzip" https://www.boston.gov/sites/default/files/js/js_o_oS34... .js
curl -X PURGE -H "X-Acquia-Purge:boston.gov" -H "Accept-Encoding: gzip" https://www.boston.gov/sites/default/files/js/js_o_oS34... .js.gz