openlibhums / janeway

A web-based platform for publishing journals, preprints, conference proceedings, and books
https://janeway.systems/
GNU Affero General Public License v3.0
172 stars 65 forks source link

Logging in after following a Janeway link removes the journal code from the URL #3002

Closed pgoussy closed 2 years ago

pgoussy commented 2 years ago

Describe the bug It appears that if you need to log in after navigating to a non-public Janeway link, instead of being redirected back to the original URL, you are redirected to a new URL that is identical except that it is missing the journal code - which makes it appear to be a "Page Not Found" on the publisher's Janeway site.

Janeway version 1.4.2

To Reproduce Steps to reproduce the behavior:

  1. Log out of Janeway (or open an incognito window)
  2. Click this link: https://journals.publishing.umich.edu/ptpbio/plugins/typesetting/preview_galley/article/2103/galley/966/#heading7
  3. Log in to Janeway
  4. Note that the URL you're redirected to is https://journals.publishing.umich.edu/plugins/typesetting/preview_galley/article/2103/galley/966/#heading7 - the same URL but without the ptpbio journal code

Expected behavior After logging in, user should be redirected to the same URL they initially tried navigating to.

Screenshots Here is a screen-recording of me demonstrating what I encountered: https://www.screencast.com/t/dq7Y7DnMXa

ajrbyers commented 2 years ago

I’ve just replicated this. We will need to patch this asap.

ajrbyers commented 2 years ago

https://journals.publishing.umich.edu/ptpbio/login/?next=/plugins/typesetting/preview_galley/article/2103/galley/966/#heading7

It looks like the ?next= Is missing the object code

mauromsl commented 2 years ago

@pgoussy This problem is specific to the typesetting plugin, so I'm moving the issue there and we will include it on the next release of that plugin

https://github.com/BirkbeckCTP/typesetting/issues/162