Skip to content

Fixed whitescreen caused by bad logic in template#1216

Merged
rpnykanen merged 3 commits intomainfrom
UHF-X_provided_language_whitescreen
Mar 13, 2025
Merged

Fixed whitescreen caused by bad logic in template#1216
rpnykanen merged 3 commits intomainfrom
UHF-X_provided_language_whitescreen

Conversation

@rpnykanen
Copy link
Contributor

@rpnykanen rpnykanen commented Mar 12, 2025

If TPR-unit had any other provided language than fi, en or sv, the tpr unit page would whitescreen.

What was done

  • Removed the provided-language template with logic in it
  • Moved the logic to TPR-entity
  • Called the entity method to get list of translated language names

How to reproduce

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-X_provided_language_whitescreen
  • Update the TPR module
    • composer require drupal/helfi_tpr:dev-UHF-X_provided_language_whitescreen
  • Run make drush-cr

How to test

  • Go to this page
    • The page should render normally
    • "Palvelukieli" should be visible with a comma separated list of languages
    • (don't mind the translations of the language names. they need to be fixed separately.)

@github-actions
Copy link

⚠️ 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/1216/html_report/

@github-actions
Copy link

⚠️ 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/1216/html_report/

@github-actions
Copy link

⚠️ 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/1216/html_report/

@rpnykanen rpnykanen merged commit 9b891cf into main Mar 13, 2025
2 checks passed
@rpnykanen rpnykanen deleted the UHF-X_provided_language_whitescreen branch March 13, 2025 07:50
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