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-8738: prevent showing active trail on menuitem for link pointing to subdomain #41

Merged
merged 5 commits into from
Sep 13, 2023

Conversation

rpnykanen
Copy link
Contributor

@rpnykanen rpnykanen commented Sep 11, 2023

Fix bug causing an active trail being visible on Etusivu's frontpage's main navigation. Link to external site should never have active trail.

What was done

Added a check to make sure active trail is never added to a link pointing to subdomain.

How to install

How to test

Reproduce bug

  • other site: Edit an existing link or add new link (pointing helfi subdomain) in main navigation. (for example https://whatever.hel.fi/en)
    • This link should cause an active trail to be visible in Etusivu's english frontpage.
  • other site: Run drush cron
  • ETUSIVU: Run drush cr
  • ETUSIVU: Go check front page. If you used the link mentioned previously, change language to english. Now there should be active trail indicator in main navigation.

Fix:

  • ETUSIVU: Run composer require drupal/helfi_navigation:dev-UHF-8738_activetrail_subdomain
  • Run drush cr
  • Check the main navigation again
    • There should not be an active trail

Test the other site as well:

  • other site: Run git checkout drupal/helfi_navigation:dev-UHF-8738_activetrail_subdomain
  • other site: run drush cr
    • Main navigation should work as it worked before.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

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