News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Registration activation link fails on subdomain?

Started by Sitestorm, January 27, 2014, 16:04:20 PM

Previous topic - Next topic

Sitestorm

Hi, I think I have the problem described here: http://forum.virtuemart.net/index.php?topic=113802.0

(Clicking the registration confirmation link in the e-mail sends you to the home-page without activating the user)

My problem is a little different though, since I have virtuemart installed on a subdomain (webshop.maindomain.nl). I think the same thing which is happening with the www to non-www rewrites may be happening to me with the subdomain (the registration activation link redirects to home, without activating the user).

Any ideas how I can solve this? I have the vm2_joomla_user_activation plugin installed and activated.

Joomla version: 2.5.17
VM version: 2.0.26d

Sitestorm

I had assumed this is a pretty usual use-case, but I guess not?

jenkinhill

I don't use registration confirmation/activation on any of my sites so have never needed to work with this, but I wonder if you could use some url rewriting with .htaccess to solve your issue?
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Sitestorm

#3
Solved it (or at least, diagnosed it):

- Virtuemart apparently logs the user in on clicking 'register', even is account activation is required.
- When the activation link is clicked and the user is still logged in, com_users assumes he must be activated and therefore redirects to the homepage without activating.

Possible solution for the above: virtuemart shouldn't log in a non-activated user.

- If I log out, then click the activation link, I get the following error message: 'Warning: Registration failed: Verification code not found'

This is caused by the 'lastvisitDate' for the corresponding user in the _users table not being null, again due to virtuemart logging in a non-activated user. (a query in com_users/models/registration.php line 47 fails)

So basically: virtuemart should not log in a non-activated user, it causes issues :) Imma gonna find me a virtuemart bugtracker to bug this.

jenkinhill

VM has to allow unregistered users to be auto-logged in or guest/anonymous shoppers would not be able to buy anything. If you want it to work differently it will not be simple to do, and would have to be switchable. All you can do at the moment is to set "Only registered users can checkout "
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Sitestorm

I have the setting set to 'Only registered users can checkout'.

I'm not talking about unregistered users, the issue is with registered but non-activated users. The only change which would be needed is to remove the auto-login of the new user after clicking 'register' (and only if user activation is set in the Joomla settings).

fildin

#6
Hi, I have exactly the same problem on my subdomain.eshop.com
Tried all modification that I found on this forum, but none of them helped, neither the plugin.

Sitestorm, how have you got this fixed, please?

Sitestorm

I used the thealmega fix: http://forum.virtuemart.net/index.php?topic=99755.msg393758#msg393758

See the post 3 posts down from that for where to fix it. Later on on that thread there is a link to a new VM version 2.5.2 which supposedly fixes the problem as well. I haven't tested that.