Error in email with subject Automated Submission Review Reminder

Hello @asmecher , how are you?
we are with a problem when we try to send automatic email. In the line Submission URL: the content should be the url plus path but it is came with http:////index.php/…
Example:
Submission URL:
http://<my_server_hostname>/var/wwwhtdocs/tools/index.php/rbfar/reviewer/submission/181322?key=6xTHrJ9h
Do you know what is wrong with it?
Best Regard,

Hi @Rondineli_Gama_Saad,

Is the base_url setting properly configured in your config.inc.php configuration file?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher
Yes, it’s.
Best regards,

Hi @Rondineli_Gama_Saad,

What is it set to?

Regards,
Alec Smecher
Public Knowledge Project Team

I will send you a example:
Dear Dr. blablabla:

Just a gentle reminder of our request for your review of the submission, “A
study of parameters affecting the solvent extraction of lactic acid from
fermentation froth,” for the Brazilian Journal of Chemical Engineering. We
were hoping to have this review by 2013-02-21, and this email has been
automatically generated and sent with the passing of that date. We would
still be pleased to receive it as soon as you are able to prepare it.

Submission URL:
http:///var/www/htdocs/tools/index.php/bjce/reviewer/submission/195216?key=5J6nb9hs

Please confirm your ability to complete this vital contribution to the work
of the journal. I look forward to hearing from you.

I forgot to ask you. I didn’t realize but the script runScheduledTasks.php it wasn’t in cron and I don’t remember when was the last time I executed it. Manually I did and many messages were send. Many of them came with old dates like the last sample that I sent you:
“ust a gentle reminder of our request for your review of the submission, “A
study of parameters affecting the solvent extraction of lactic acid from
fermentation froth,” for the Brazilian Journal of Chemical Engineering. We
were hoping to have this review by 2013-02-21, and this email has been
automatically generated and sent with the passing of that date. We would
still be pleased to receive it as soon as you are able to prepare it.”
Do you know why happenned it?

Hi @Rondineli_Gama_Saad,

What is your base_url setting in config.inc.php set to?

It sounds like you ended up sending a backlog of lots of emails from a long time ago. That’s to be expected if there were lots of submissions for which reminders would’ve been sent.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

I still have to wait till tomorrow to confirm this (do not know how to trigger the automated reminder otherwise than wait the day to change?), but it seems that this setting will cause the behavior described above:
base_url = "http://mydomain.fi"

And simply by changing the setting to
base_url = http://mydomain.fi
… will fix this issue.

Without the quotation marks the url was fine on my test server and I now changed the setting back to the original and will wait and see what happens with the next reminders.

I am using 2.4.5.0.

EDIT: that was not it. Some server setting has to be causing this behaviour, because on my test server the url is generated correctly but on my production server I see a similar url as above. The test server is an exact copy of the production server and apart from the url in the base_url setting so is the config.inc.php.

Any ideas what could be causing this? What server settings could be affecting here?

EDIT2: Ok, so my test server does not have cron jobs defined. If you run scheduled tasks using cron, the url’s are not generated correctly.

Hi @asmecher / @ajnyga,
the variable base_url was base_url = “http://submission.scielo.br”. I changed as @ajnyga sugested without quotation.
I will wait until someone left an automatically reminder.
Best Regards,

That was not it, I was already able to test this.

Do you use a Cron job to run tasks? I think this is related to this: https://github.com/pkp/pkp-lib/pull/1427

https://github.com/pkp/pkp-lib/issues/1426

Are you suggesting I remove the line, aren’ you?
: (isset($_SERVER[‘HOSTNAME’]) ? $_SERVER[‘HOSTNAME’]

I do not know yet, I will try to solve this myself later today. But the problem seems to be cron jobs. Using Acron instead would of course solve this. I will let you know if I find out a solution.

how could I set up an acron task?
Regards,

I guess it is just matter of turning on Acron plugin and removing your cron jobs. But as I said, I will look into this later today.

Edit: Tagging @ctgraham here…

Correct. Enabling the Acron plugin under the Generic Plugins category will activate automatic execution of certain scheduled tasks based on normal user interaction with the site. Note that if no one browses your site on a particular day, Acron will not be able to run any scheduled tasks on that day.

I would not recommend running Acron in 2.4.5 without backporting the following patch:

There are several critical flaws in the execution logic which will allow Acron to execute the same task multiple times on busy sites.

I do recommend replacing HOSTNAME with SERVER_NAME in the patch for issue 1427.

Thanks!

If we want to continue using Cron instead of Acron, then there are three possible fixes, if I understand correctly:

  1. Define base_url[index] in Config.inc.php. This solution I picked up from this threat: PKP PLN Network Status is confused by URL aliases · Issue #1423 · pkp/pkp-lib · GitHub

  2. Running Cron from the OJS directory (your 9 Jun message here PKP PLN Network Status is confused by URL aliases · Issue #1423 · pkp/pkp-lib · GitHub) <= not sure whether this would work in this case, ie. would the url be any different?

  3. Using this patch: Use only webserver variables for hostname detection (not OS "HOSTNAME… · pkp/pkp-lib@fd0a06e · GitHub (how is this different from 1427?)

Is this correct? I will probably do the first one and see if it works.

Defining base_url[index], along with any/all base_url[journal] entries is a pretty certain solution.

Running cron from the OJS directory did work in multiple cases for us before we applied the fix from Pull Request 1427. After applying PR 1427, we tested OK for running cron with absolute paths again.

The patch (fd0a06ed…) you mention was an early attempt to fix the problem and is superseded by the open pull request.