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-8946: redirect to existing job listing translation #313

Merged
merged 15 commits into from
Sep 14, 2023

Conversation

rpnykanen
Copy link
Contributor

@rpnykanen rpnykanen commented Sep 13, 2023

UHF-8946

External system is only capable of creating links to finnish job listings. If job listing doesn't have finnish translation the user would see 404 page.

What was done

Added 404 exception listener which redirect user from untranslated job listing to the existing translation if it exists.

How to install

  • Make sure your instance is up and running on correct branch.
    • git checkout UHF-8946_job_redirect
    • make fresh
  • Run make drush-cr

How to test

  • Go to job listing and use a filter to find a job with only swedish translation
  • open the job
  • manually change the url from /sv/lediga-jobb/lediga-jobb/{job_recruitment_id} to
    • /fi/avoimet-tyopaikat/avoimet-tyopaikat/{job_recruitment_id}
  • When you try to access finnish translation, you are redirected back to swedish translation.

Other things to try out:

  • Test other translation combinations if possible
  • Test paths starting with /fi/avoimet-tyopaikat/avoimet-tyopaikat/, for example non existing recruitment id

@rpnykanen rpnykanen marked this pull request as ready for review September 14, 2023 08:10
@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

@hyrsky hyrsky self-requested a review September 14, 2023 09:59
@rpnykanen rpnykanen merged commit ea17936 into dev Sep 14, 2023
@rpnykanen rpnykanen deleted the UHF-8946_job_redirect branch September 14, 2023 11:51
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