Plugin Support
Daniel
(@danieldandu)
Hi @adrian33000 ,
Thank you for reaching out.
Could you please check whether the verification link/URL is being translated by TranslatePress?
You can check this in the String Translation Interface→ Slugs. Please look for the relevant URL/slug used by the Directories Pro verification link and check whether it has a translation assigned.
If the URL appears there, please try removing its translation and test the verification link again.
Let me know how it goes.
Hi Daniel
Thank you for your reply. I have tried to find the String Translation Interface→ Slugs you mention but have not been able to pin this down.
The site is in two languages, English and Spanish and it seems that if English is set as the primary language and the site is in English when the registration is made, the email is then in English and the link, when clicked will authenticate the User. However, if the primary language is set to Spanish or if the user is registering when the site is in Spanish mode the email is in Spanish and the link does not work to verify the User who then cannot log in.
Examples of the link in the email are:-
With verification/TP activated in English: https://gopuertoplata.com/staging/5020/en/login/verify_account/?id=474&key=3e4f384444d420420bd915aee6fb3846082d1d4b
With verification/TP activated in Spanish: https://gopuertoplata.com/staging/5020/es/login/verify_account/?id=476&key=47aa3706df7f9f5ff7891b005c8a2745e2d39d7f
The difference appears to be the addition of “amp;” after the id=476& and before the “key” in the Spanish registration version, which I guess is negating the link and stopping the registration from being validated in the User list, and as a result, stopping the user from logging in.
If you can suggest any option to remove the apparent translation of this link that would likely resolve the issue, and would be greatly appreciated.
Thanks
Plugin Support
Daniel
(@danieldandu)
Hi @adrian33000 ,
Thank you for the update and for providing the examples.
As a first step, could you please try adding the following path to Do not translate certain paths:
login/verify_account/*
Please also make sure that Exclude Paths From Translation is selected.
You can find this option by going to Settings → TranslatePress → Advanced → Exclude strings & pages
After adding the path, please test the registration and verification process again.
If this does not resolve the issue, we’ll need to investigate it further. In that case, please open a support ticket on our website here.
Please also point out that you have already contacted us on the WordPress forum and add a link to the conversation in the ticket you will create.
Hello
Unfortunately, that did not work but I have managed to track the Directories Pro code that calls for the email to be sent. This is as follows:
<public function defaultEmail( Application $application, ?array $tags = null ) {
/* translators: Verify account email subject. %s: Site name */
$subject = sprintf( ( '[%s] Verify your account', 'directories-pro' ), isset( $tags ) ? $tags['%%site_name%%'] : '%%site_name%%' ); $body = sprintf( ( 'Hello %s,', 'directories-pro' ), isset( $tags ) ? $tags['%%user_name%%'] : '%%user_name%%' ) . "\r\n\r\n";
$body .= ( 'Please click the following link to verify your account:', 'directories-pro' ) . "\r\n"; $body .= ( isset( $tags ) ? $tags['%%verify_account_url%%'] : '%%verify_account_url%%' ) . "\r\n\r\n"; $body .= ( 'If this was a mistake, just ignore this email and nothing will happen.', 'directories-pro' ) . "\r\n\r\n";
$body .= ( isset( $tags ) ? $tags['%%site_name%%'] : '%%site_name%%' ) . "\r\n" . ( isset( $tags ) ? $tags['%%site_url%%'] : '%%site_url%%' );
return array( $subject, $body );
}
I don’t know if this will enable a way to exclude the translation of the line in the email, which is clearly dynamically created for each individual registration, but maybe you can isolate the specific string that is being adapted and seems to add the “amp;” after the id and id number, which then stops the link from performing its function in validating the registered user.
Thanks. I hope this might help
Adrian
Plugin Support
Daniel
(@danieldandu)
Hi @adrian33000
Thank you for the update.
Due to the situation you are facing, my suggestion is to open a ticket on our website here, as we will have to investigate this issue.
Please also point out that you have already contacted us on the WordPress forum and add a link to the conversation in the ticket you will create.
Thank you for understanding!