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

Fix crash on cookie setting #2258

Merged
merged 1 commit into from
Sep 2, 2020
Merged

Fix crash on cookie setting #2258

merged 1 commit into from
Sep 2, 2020

Conversation

maxgds
Copy link
Contributor

@maxgds maxgds commented Aug 27, 2020

The banner code was trying to manipulate a cookie that doesn't
yet exist. This sets the default if none is present and removes
a redundant if statement.

The bug can be seen by going in an incognito window (so no cookies are set for the site) to http://www.gov.uk/help/cookies - the js crashes and makes it impossible to set cookie preferences which is the purpose of that page. This probably only affects this page as elsewhere the cookie defaults are set in the cookie banner that is excluded from appearing here.

@bevanloon bevanloon temporarily deployed to govuk-static-fix-cookie-xbnji8 August 27, 2020 09:16 Inactive
@bevanloon bevanloon temporarily deployed to govuk-static-fix-cookie-xbnji8 August 27, 2020 09:19 Inactive
The banner code was trying to manipulate a cookie that may not
yet exist. This sets the default if none is present and removes
a redundant if statement.
@bevanloon bevanloon temporarily deployed to govuk-static-fix-cookie-xbnji8 August 27, 2020 09:55 Inactive
@maxgds maxgds marked this pull request as ready for review August 27, 2020 10:15
Copy link
Contributor

@owenatgov owenatgov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

@maxgds maxgds merged commit 46330c3 into master Sep 2, 2020
@maxgds maxgds deleted the fix-cookies-bug branch September 2, 2020 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants