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

Can't change Site lang in Account MFE #223

Open
cmltaWt0 opened this issue Sep 16, 2024 · 1 comment
Open

Can't change Site lang in Account MFE #223

cmltaWt0 opened this issue Sep 16, 2024 · 1 comment

Comments

@cmltaWt0
Copy link
Contributor

cmltaWt0 commented Sep 16, 2024

I want to link the issue here since the last comment points to a possible Tutor issue.

The current state is the following:

  • I can't see the result of Site lang changing action in the Account MFE immediately
  • I can see the result after the page reload
  • I can see the CORS info (Response body is not available to scripts (Reason: CORS Preflight Did Not Succeed)
    and 405 Method Not Allowed
image
@regisb
Copy link
Contributor

regisb commented Sep 16, 2024

When I click "save" the following happens:

  1. POST to <LMS>/i18n/setlang/
  2. redirect to GET <LMS>/ (no idea why)
  3. redirect to GET <LMS>/dashboard (probably because the dashboard is the landing page)
  4. redirect to GET <MFE>/learner-dashboard (probably because the LMS is configured to point to the MFE dashboard)
  5. for some unknown reason this is considered a CORS request, so make OPTION <MFE>/learner-dashboard
  6. CORS request is failing because MFEs are really not supposed to support them.

That thing is a bloody mess. As far as I understand, the issue is with step 2. Why, oh why are we trying to GET /? The CORS issue is a false lead, it's only pointing to a side effect of the actual root cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants