You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suppose the "Tips" section of the ReadMe file for DKAN JS Frontend module is not correct anymore:
Set the 404 and home paths for the site to /home. This will make it so whenever Drupal returns a page not found it will load the JS frontend and visiting the root url the JS site will be loaded instead of a default Drupal node.
But this would not solve the problem with the 404 path as far as I could see. This will still result in the "Unexpected Application Error". I suppose this is due to different handling of React Router. Seems it would need something like this at the end of https://github.com/GetDKAN/data-catalog-app/blob/main/src/index.jsx#L46:
I just started working on a couple of PRs in the data-catalog-app GetDKAN/data-catalog-app#145 and GetDKAN/data-catalog-app#144 that should fix this. I may have to work on the Drupal config in the ddev demo build if there are any more issues.
In our router file we didn't have two routes that were causing the issues:
The home route wasn't specified to redirect to root, so it would be treated as a 404/page not found.
We didn't have a wildcard route at the end of the router setup to catch all other routes and send to the NotFound page. The Unexpected Error messaging was being served by React since it didn't know what to do when given an incorrect route.
Describe the bug
I suppose the "Tips" section of the ReadMe file for DKAN JS Frontend module is not correct anymore:
This will not work anymore, probably since release 1.4.0 of data catalog app, precisely since GetDKAN/data-catalog-app#129
Now going to /home will give an "Unexpected Application Error" from the React app, see https://demo.getdkan.org/home
And if you use /home as 404 path in Drupal it will also give this "Unexpected Application Error" whenever a 404 occurs.
To fix the issue with /home one could add the "/home" path in the data catalog app: https://github.com/GetDKAN/data-catalog-app/blob/main/src/index.jsx#L19
But this would not solve the problem with the 404 path as far as I could see. This will still result in the "Unexpected Application Error". I suppose this is due to different handling of React Router. Seems it would need something like this at the end of https://github.com/GetDKAN/data-catalog-app/blob/main/src/index.jsx#L46:
Steps To Reproduce
Expected behavior
Behave like described in the Tips section
The text was updated successfully, but these errors were encountered: