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

[BACKPORT] fix: internal routing ignores public path #313

Conversation

dyudyunov
Copy link
Contributor

This is a backport from master

The only difference is that the quince version uses an older version of the frontend-platform and there is no getPath function there. The behavior is the same.

Description

Internal routes don't respect the PUBLIC_PATH which leads to redirecting to incorrect URLs.

Add a new util function for constructing the correct internal route URL.

Steps to reproduce

You'll need an instance deployed with the common domain for MFEs (each MFE should have the PUBLIC_PATH set).
You can reproduce it using Tutor.
Devstack uses separate domains for each MFE so you won't reproduce the issue there!

  1. Set up a program
  2. Go to Profile and click on "View My Records" button
    Screenshot 2024-03-28 at 17 48 13
  3. Click on "View Program Record" button
    Screenshot 2024-03-28 at 17 49 02

Actual result

PUBLIC_PATH for Learner Record MFE is ignored, and the user is redirected to the wrong URL
image

The same result on the Program Records page for the "Back To My Records" link
Screenshot 2024-03-28 at 17 55 21

Expected result

Correct internal routing is performed

Notes

I'll create a backport PR for Quince soon

Add a new util function for constructing the correct
internal route URL.
@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Mar 29, 2024
@openedx-webhooks
Copy link

Thanks for the pull request, @dyudyunov! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

Copy link

codecov bot commented Mar 29, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 69.78%. Comparing base (c3e2599) to head (4583878).

Files Patch % Lines
...mponents/ProgramRecordsList/ProgramRecordsList.jsx 33.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@                      Coverage Diff                       @@
##           open-release/quince.master     #313      +/-   ##
==============================================================
+ Coverage                       69.60%   69.78%   +0.17%     
==============================================================
  Files                              27       28       +1     
  Lines                             408      417       +9     
  Branches                           90       94       +4     
==============================================================
+ Hits                              284      291       +7     
- Misses                            123      124       +1     
- Partials                            1        2       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@justinhynes justinhynes merged commit 4795361 into openedx:open-release/quince.master Mar 29, 2024
7 checks passed
@dyudyunov dyudyunov deleted the quince/fix-internal-routing branch June 19, 2024 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Status: Done
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants