Emails have wrong URL - show file path instead (possible bug)

When emails are sent out they have the filepath rather than the URL like this:

Please log into the journal web site … is https://localhost/www/vhosts/ojs.jaltcall.org/htdocs/tools/index.php?journal=JALTCALL

I believe I have the correct base_url set in the OJS Configuration:

; The canonical URL to the OJS installation (excluding the trailing slash)
base_url = https://jcj.jaltcall.org

and the OJS Configuration in the Admin area shows:

base_url	https://jcj.jaltcall.org
base_url[index]	https://jcj.jaltcall.org

This is 3.1.1.0

This happens on mails sent out by the cron job ( scheduled_tasks = On )
0 * * * * php /path/to/ojs2/tools/runScheduledTasks.php

but not on mails such as password reset that are sent through the website.

Any ideas how to fix this?

Edit: after posting this as a (possible) bug report on GitHub, I had the following suggestion:
base_url[JALTCALL] = https://jcj.jaltcall.org
to the config file.

(I’m not sure why this would be necessary because the present setup implies all Journals have the same URL as defined in the base_url configuration, and it strikes me as a bit odd that I would have to add this for each new journal on the site. Also, adding this causes a redirect loop on the https://jcj.jaltcall.org page itself, although for the moment I simply redirect to https://jaltcall.org/index.php?journal=JALTCALL to prevent this. )

I’m running nginx.

I’m a reasonably proficient PHP programmer so I’d be happy to look at my setup and see why my setup is passing the path if someone points me to the file where this link is determined.

Many thanks,

See [OJS] Mails sent via Cron have filepath rather than URL · Issue #4201 · pkp/pkp-lib · GitHub for follow-up.

Regards,
Alec Smecher
Public Knowledge Project Team