Unsubscribe link only works if already logged in

Describe the issue or problem
Following the unsubscribe link in an OJS notification seems to only work if the user is already logged in. If they are not logged in, they see the login page and then are taken to either the journal index page or the submission page depending on their role.

Steps I took leading up to the issue

  1. Set up a user as a reader for a journal
  2. Publish a new issue and email the readers
  3. Log out of OJS
  4. Follow the unsubscribe link in the email
  5. Log into OJS

I expect to see the unsubscribe page for the journal.

What application are you using?
OJS 3.4.0.6

Additional information
When I’m already logged in, …/notifications/unsubscribe responds with the unsubscribe page for the journal.

When I’m not already logged in, …/notifications/unsubscribe responds with a 302 to …/login.

The behaviour seems to be the same as clicking the login link for the journal. It seems I’m loosing the context of logging in order to unsubscribe.

This is happens if «Enable this journal to appear publicly on the site» is not ticked.

Both «Users must be registered and log in to view the journal site» and «Users must be registered and log in to view open access content» were unticked.

Ticking «Enable this journal to appear publicly on the site» seems to have enabled the desired behaviour of allowing someone to unsubscribe without logging in first.