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

UHF-11234: prevent error #1152

Merged
merged 2 commits into from
Jan 10, 2025
Merged

UHF-11234: prevent error #1152

merged 2 commits into from
Jan 10, 2025

Conversation

rpnykanen
Copy link
Contributor

@rpnykanen rpnykanen commented Jan 9, 2025

prevent removeattribute call on undefined

UHF-11234

What was done

  • Check that element exists before trying to call removeAttribute-function

How to install

  • Make sure your instance is up and running on latest dev branch.
    • git pull origin dev
    • make fresh
  • Update the HDBT theme
    • composer require drupal/hdbt:dev-UHF-11234
  • Run make drush-cr

How to test

  • Login as admin
  • Enable survey-block on any language
  • Go to any content page (where the survey is enabled), wait for the survey to load
  • The error that used to show up when survey-popup was loaded, is gone.
  • Check that this feature works
  • Check that code follows our standards

Copy link

github-actions bot commented Jan 9, 2025

⚠️ Visual regression found! Please check if this change is wanted or accidental. You can check the output here: https://city-of-helsinki.github.io/drupal-hdbt-visual-regression/pull/1152/html_report/

@annadruid
Copy link
Contributor

Screenshot 2025-01-09 at 17 47 07

There's still this js error. Can be fixed with adding ? to line 67

const cookieButton = shadowRoot?.querySelector('.hds-cc__all-cookies-button');

Copy link

github-actions bot commented Jan 9, 2025

✅ Tests passed! You can check the output here: https://city-of-helsinki.github.io/drupal-hdbt-visual-regression/pull/1152/html_report/

Copy link
Contributor

@annadruid annadruid left a comment

Choose a reason for hiding this comment

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

Looks good!

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.

2 participants