Issue published notification article and PDF links do not resolve, "You cannot call this operation without a context"

Describe the issue or problem
I am running into an issue with article and PDF links generated in the automatic “issue published” notification email.

When the issue was published, the issue URL worked correctly but the article and PDF links in the email do not. They lead to an error page with the message “You cannot call this operation without a context (press, journal, conference, etc).”

The issue URL works:

/journal_path/issue/view/82

The article and PDF links generated in the email do not work:

/journal_path/ojs/index/article/view/877

/journal_path/ojs/index/article/view/877/1775

Steps I took leading up to the issue

  1. Published a new issue.
  2. Sent the automatic issue published email notification.
  3. Clicked the issue, article, and PDF links in the email.

What application are you using?
OJS 3.5.0.3

Additional information

Our config is set up with:

restful_urls = On

base_url = "https://url.edu/journal_path/ojs"

base_url[journal_path] = "https://url.edu/journal_path"

I am not sure whether this is a config issue, a RESTful URL/rewrite issue, or an issue with how the notification email generates the article/pdf links.

Any guidance would be greatly appreciated.

Hi, just to confirm one thing first, you are using cron or worker at CLI mode to process queue jobs and not using the job runner, right ? can you check and confirm it .

Regards
PKP Dev Team

I checked our config and we have:

job_runner = On

We have not set up cron jobs for this OJS instance, so it looks like we are using the built-in job runner.

confirm this is a bug, an issue registered at [Mail] | Issue published notification article and PDF links do not resolve · Issue #13225 · pkp/pkp-lib · GitHub and a fix hopefully will be released at next release .

Regrads
PKP Dev Team

Thank you for that update! Would switching to a cron job resolve this issue in the mean time?

Would switching to a cron job resolve this issue in the mean time?

Actually not, it’s kind of related to jobs but not 100% either as need some fix to template data pass . Pr pretty much ready and fix will be available in next release .