pulibrary / pdc_describe

Description application for Research Data content
7 stars 1 forks source link

Links to works have an extra /describe/ in the URL #1783

Closed hectorcorrea closed 5 months ago

hectorcorrea commented 5 months ago

The links that we are generating in our emails to users (e.g. to curators when work has been marked as ready for review) and the some of the links in the "Messages" section have an extra /describe in the URL. For example they point to

https://pdc-describe-prod.princeton.edu/describe/describe/works/305

instead of

https://pdc-describe-prod.princeton.edu/describe/works/305

The fact that only some links are wrong makes me thing this is a new issue introduced in our latest release

Screenshot 2024-04-24 at 1 49 29 PM

hectorcorrea commented 5 months ago

This issue also happens with the links displayed in the Provenance

Screenshot 2024-04-25 at 4 24 56 PM

hectorcorrea commented 5 months ago

Sarah confirmed that the email now include the correct link. The provenance log also shows the correct URL now for new notifications:

Screenshot 2024-04-26 at 3 18 44 PM

hectorcorrea commented 5 months ago

This is what the log shows with the workaround introduced in https://github.com/pulibrary/pdc_describe/pull/1787

E, [2024-04-26T19:05:03.409350 #1348407] ERROR -- : URL [Intraday US Equities Dynamic Analysis and Forecasting](https://pdc-describe-prod.princeton.edu/describe/describe/works/302) included /describe/describe/ and was fixed. See https://github.com/pulibrary/pdc_describe/issues/1783
E, [2024-04-26T19:05:16.201110 #1348340] ERROR -- : [ActiveJob] [ActionMailer::MailDeliveryJob] ... URL https://pdc-describe-prod.princeton.edu/describe/describe/works/302 included /describe/describe/ and was fixed. See https://github.com/pulibrary/pdc_describe/issues/1783

Notice how caught the /describe/describe URLs and fixed them.

hectorcorrea commented 5 months ago

This bug was fixed with PR https://github.com/pulibrary/pdc_describe/pull/1787 but the solution in that PR is rather hacky.