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
Describe the bug
When navigating the catalog pages on https://arcticdata.io/catalog, clicking on a page seems to add another /catalog to the path. Similarly, when using the sandbox instance at https://mn-sandbox-ucsb-1.test.dataone.org/metacatui, /metacatui is added to the path every time the user navigates to a new page. This happens both when clicking on the arrows and when clicking on the page number.
One challenge with reproducing this issue is that our production site uses Apache, while we are using Express in development. To mimick the ADC's behaviour of serving MetacatUI from "/catalog" in production, we can configure Express to serve the app from the same base URL. This involves setting up the Express server to recognize and handle requests prefixed with /catalog and to add a special route for config/config.js to be served from catalog/config/config.js. Here is a Express server setup that does this:
Express server setup (click to expand)
constexpress=require("express");constpath=require("path");constport=process.env.PORT||3000;constapp=express();// Subdirectory where index.html and the rest areconstsrcDir="src";// Absolute path to the src directoryconstsrcPath=path.resolve(__dirname,srcDir);// Absolute path to index fileconstindexPath=path.resolve(__dirname,srcDir,"index.html");// Absoloute path to config fileconstconfigPath=path.resolve(__dirname,srcDir,"config","config.js");// Serve static files from /catalogapp.use("/catalog",express.static(srcPath));// Special route for config/config.js to fetch from catalog/config/config.jsapp.get("/config/config.js",function(request,response){response.sendFile(configPath);});app.get("/catalog/*",function(request,response){console.log("Request for catalog: "+request.url);response.sendFile(indexPath);});app.listen(port);console.log("Now running at http://localhost:"+port+"/catalog");
Describe the bug
When navigating the catalog pages on https://arcticdata.io/catalog, clicking on a page seems to add another
/catalog
to the path. Similarly, when using the sandbox instance at https://mn-sandbox-ucsb-1.test.dataone.org/metacatui,/metacatui
is added to the path every time the user navigates to a new page. This happens both when clicking on the arrows and when clicking on the page number.To Reproduce
Steps to reproduce the behavior:
Expected behavior
The URL page number should change or increment, but the rest of the URL should remain the same as it was prior to navigation.
Screenshots
arcticdata.io:
sandbox:
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
This does not happen on https://search.dataone.org, https://drp.dataone.org/data, or https://knb.ecoinformatics.org/data
The text was updated successfully, but these errors were encountered: