How can I use email variables in the URL to create a certificate for the reviewer?

Describe the issue or problem
I have page that creates a certificate for reviewer with data from the URL.

When I use the mail variables in the URL it doesn’t work. URL link cannot read mail variables.

My email template:

Get Certificate

Get Certificate URL:{$reviewerName}&journals=JOURNAL_NAME&title={$submissionTitle}&language=en

Simple text not URL:{$reviewerName}&journals=JOURNAL_NAME&title={$submissionTitle}&language=en

Get Certificate URL didn’t work.
Simple text worked.

If I copy and paste text from email into the browser, the certificate is created. However, I want it to work when “Get Certificate” is clicked.

My question: Is there a way to use email variables in the URL?

What application are you using?
For example, OJS 3.3.0-15

Dear @asmecher @rcgillis @jnugent

Do you have any ideas about this, how can I solve this problem/situation?

Hi @kerimsarigul,

I don’t think you’ll be able to do this without making at least some small code modifications. The email variables are not URL-encoded, so when you attempt to include them in a URL, there will be lots of characters that won’t be properly escaped for use in a URL.

The best way to do achieve what you’re looking for is probably to add a new email variable that’s built in the PHP code. See for example this code, which assigns a URL to a variable in what I think is the code responsible for building the screen you’ve pasted:

Alec Smecher
Public Knowledge Project Team

1 Like

This topic was automatically closed after 9 days. New replies are no longer allowed.