openedx / frontend-app-discussions

A React-based micro frontend for the Open edX discussion forums.
GNU Affero General Public License v3.0
6 stars 61 forks source link

Master branch not working with tutor #584

Closed FatemeKhodayari closed 8 months ago

FatemeKhodayari commented 9 months ago

Hi. I'm running openedx palm 3 with tutor. When switching the discussions MFE to the master branch, after launch, I get this page:

fc855bc0de8bf78905148bb6929a458cc62b1fa2

The said line is const { params: { page } } = useRouteMatch(`${Routes.COMMENTS.PAGE}?`);. So I assume that the useRouteMatch function is returning null. Can you please help me with this?

This issue was first posted in the forum.

xitij2000 commented 8 months ago

I've investigated this and it's happening because frontend-platform sets the basename for the browser history to the PUBLIC_PATH which is set to the application name in tutor.

What this means it that the discussions MFE is trying to match paths starting with /discussions/... whereas frontend platform has already stripped those out.