URL In Confirmation Email Using Wordpress
I have recently installed Vanilla in a /forum sub directory, and successfully embedded the forum into a Wordpress build that is installed into the root. The only problem I seem to have is the email confirmation url sent to new users. It directs users to the /forum url, instead of the Wordpress slug /public-forum. I noticed there is a setting in the dashboard for "Force your forum to be viewed through the Remote Url", in the Vanilla settings. That only redirects the visitor to the Wordpress page, but it breaks the email confirmation link. It seems to confirm the email address, but ultimately the visitor ends up seeing an error stating "We couldn't confirm your email. Check the link in the email we sent you or try sending another confirmation email.".
Is there a way to have the forum function completely within the Wordpress page embed, including the email confirmations?
Comments
this thread might help, obviously you need to adjust the link to match what you want in the definition.
http://vanillaforums.org/discussion/21879/change-email-content/p1
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I changed EmailConfirmEmail definition in definitions.php to the below, to no avail. It still emails the link to the sub directory /forum instead of the slug /public-forum.
$Definition['EmailConfirmEmail'] = 'You need to confirm your email address before you can continue. Please confirm your email address by clicking on the following link: http://mydomain.com/public-forum/#/entry/{User.UserID,rawurlencode}/{EmailKey,rawurlencode}';
I also inserted a definition for the confirm email in conf/locale.php (same as above) and it didn't work either.
So I changed the definition in locale.php to...
It still didn't change it in the original email with the confirmation link, but it does change it in the email that you get when you click the link to resend the confirmation link....weird.
Any idea why that would be?
@kolivier
try changing it to what you want the link to be in conf/locale.php.
delete the files ending .ini in the cache as you should do when adding locale files.
try the application process with a new test user and see if the problem occurs after you do the above.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I have changed the conf/local.php to the code I posted in my previous post, and deleted the cache (ini files), but the confirmation email still has the wrong link. As I said, the email that is sent when you click "resend the confirmation link" has the correct url, just not the original email. Should I revert the definitions.php back to the original code? Is that causing a conflict maybe?
The initial email confirmation email reads..
The link to the website is fine, but the confirmation link is wrong. But when I click "resend the confirmation" link, I get....
As you can see, that email has the correct link to confirm the email. Trying to figure out why its correct on the resend confirmation email, but not the original confirmation email.
Anyone? I am noticing as I go that all the links are going to point to the default install of vanilla and not the imbedded Wordpress page. The password reset email, email confirmation, and so forth. There must be a way to change it globally, no? The link to the forum is changed easy enough in the confirmation email, but the change to the link that confirms the email simply won't take.
I don't even know where to start with the forgot password definition in locale.php. The code is..
I not sure how to change that link to direct users to the embedded page. The other links for emails in definitions look somewhat like links, and are easy to change....even though some won't take lol. beats head on desk
Any help would be greatly appreciated! The forum simply won't work unless the visitor never leaves the Wordpress site.
I got your pm and will try to help you.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Had the exact same problem. @peregrine helped me out until we got it working. I just PM'd you the solution we (actually it was mainly just peregrine) arrived at.
So maybe this is a bug? I thought I had screwed something up royally and it was just my system. But your having the exact same problem.
If you find a different solution than mine (the one I PM'ed you) can you let me know?
@thecashbag
You know @thecashbag , until @kolivier had the same issue. I thought it all could be changed via definitions and locale.php - since thecashbag was having so much trouble with setting up you locale.php and definitions.
we followed the same procedure as you modifying locale.php and adding appropriate definitions and the only thing that worked was a change to
applications/dashboard/models class.usermodel.php
the changes we made were in two places (you may want to change the second one @cashbag for forgotten password emails.
in applications/dashboard/models class.usermodel.php
unfortunately a mod to the core
line 12
const DEFAULT_CONFIRM_EMAIL = 'You need to confirm your email address before you can continue. Please confirm your email address by clicking on the following link: http://theembeddedforum.com/public-forum/entry/emailconfirm/{User.UserID,rawurlencode}/{EmailKey,rawurlencode}';
and line 2268 in
ExternalUrl('http://theembeddedhost.com/public-forum/entry/passwordreset/'.$User->UserID.'/'.$PasswordResetKey)
if someone knows a different way to change this please post.
changing the definitions did not work for two people (cashbag and kolivier now so it seems confirmed that either another definition needs to be changed that I am unaware of or the file above needs to be changed to institute changes.
@Todd - do you have any other ideas.
changing
$Definition['EmailConfirmEmail'] = 'You need to confirm your email address before you can continue. Please confirm your email address by clicking on the following link: http://mydomain.com/public-forum/index.php#/entry/emailconfirm/{User.UserID,rawurlencode}/{EmailKey,rawurlencode}';
will only change the link when the link is sent separately.
Hello joe3!
You need to confirm your email address before you can continue. Please confirm your email address by clicking on the following link: http://theembeddedforum.com/public-forum/entry/emailconfirm/20/2WFXC85I
Have a great day!
but will not change the email confirm link in this email
[Public Forum] Welcome Aboard!
Hello joe!
You have successfully registered for an account at Public Forum. Here is your information:
Username: joe Email: joe@none.com
You can access the site at http://theembeddedforum.com/public-forum.
You need to confirm your email address before you can continue. Please confirm your email address by clicking on the following link: http://theembeddedforum.com/forum/entry/emailconfirm/20/2WFXC85I
Have a great day!
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I believe this was also tried in an earlier situation and that did not seem to work either.
$Configuration['Garden']['ExternalUrlFormat'] = ' http://theembeddedforum.com/public-forum'
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I meant to say
I believe this was also tried in an earlier situation with someone else and that did not seem to solve the above issue either.
$Configuration['Garden']['ExternalUrlFormat'] = ' http://theembeddedforum.com/public-forum'
$Configuration['Plugins']['EmbedVanilla']['ForceRemoteUrl'] = '1';
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Did someone find a solution for this issue?
It happens to me also when I click on a link in a reply notification email.
in the original class.usermodel.php try changing this line 12
const DEFAULT_CONFIRM_EMAIL = 'You need to confirm your email address before you can continue. Please confirm your email address by clicking on the following link: {/entry/emailconfirm,url,domain}/{User.UserID,rawurlencode}/{EmailKey,rawurlencode}';
to this
const DEFAULT_CONFIRM_EMAIL = 'You need to confirm your email address before you can continue. Please confirm your email address by clicking on the following link: http://YOURSITE.COM/public-forum/{User.UserID,rawurlencode}/{EmailKey,rawurlencode}';
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Thanks. Sadly this doesn't work. Moreover, what should I do about the reply notification email?
unfortunate. It worked perfectly for the other two people, who had the problem.
most of the other questions relating to email definitions have been answered on the board, you just need to scout around and search the forum, and read up on the localization and the various email definitions in the documentation.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
This is sort of a shot in the dark, but I'm wondering if the issue people have been having with getting
$Definition['EmailConfirmEmail']
to work have to do with the fact that the confirm email comes from a different "application"?Specifically, people are probably following the generally available instructions for providing translations for the "vanilla" application, but in this case it is the "dashboard" application that needs to be translated. Are people putting the
$Definition
in the wrong file?I ask it as a question because I don't actually know enough about translations to answer, but I'm hoping that by stating the question it will help someone who is more familiar make the connection and provide the correct answer.