Hey guys,
First post so sorry if I'm doing it wrong, but this is probably worth bringing to attention:
(Using Joomla 3.3.6 and virtuemart 3.0.6)
Whenever a user registers with a username that already exists, the page just refreshes with no error message.
It's happening on a site I'm working on now, and it happens on your demo site http://demo.virtuemart.net/account if you try to register with the username 'demo' (because it already exists).
I also tried putting the <jdoc:include type="message" /> above <jdoc:include type="component" /> (a commonly suggested fix) but it doesn't seems to work.
I had a search for this but couldn't find anything relevant to joomla 3.x
Looking forward to your response
afaik VM has done this since VM2 days .. and yes - not ideal...
I opened a topic last year for this : http://forum.virtuemart.net/index.php?topic=127466.0
But no answer and no solution yet.
Damn, seems like a pretty big issue!
Does anyone have any good workarounds?
I never see an issue like this as none of my sites require registration, all work as guest checkout only because I want the customers to buy as easily & simply as possible.
But I have remembered this: http://forum.virtuemart.net/index.php?topic=115425
I think the best system would be a live check of the username and email as they are filled (by ajax)
On another non VM project I am using com_ajaxregister and this works really well http://www.sakic.net/products/ajax_register/documentation/
It does a quick DB query by ajax as soon as you leave the field
http://www.investorenmagazin24.de/index.php?option=com_ajaxregister&view=registration&Itemid=148
try test1 as benutzer or test1@gjcwebdesign.com as email
if something like this could be developed for VM it would be ideal
Thanks heaps for the response guys,
I've tried everything suggested and unfortunately am still having no luck.
If there's any other ideas you might have I'm all ears!
It seems like it's been a bit of an issue for a while.
One page checkout by rupostel includes this feature at least on registration from checkout. On pre registration I have not tested.
Ask Stan to make sure https://www.rupostel.com/
I wonder, this should have been fixed since 3.0.4
Thank you, found.
Thanks again for your replies,
I've messaged Rupostel and now awaiting his reply.
I'll keep you all posted
Hello Milbo,
What do you mean when you write "Tank you, found"?
Do you mean, we need to use the One Page Checkout for VirtueMart to solve this problem?
It simply means that I found the error and fixed it.
and no you do not need to use any commercial OPC. The error was just that vmError('my message') shows the error only to admin, vmError('my message','muh') shows to the admin "my message' and to anyone else 'muh'
Great News.
Do you know by when it will be released?
Hello Milbo,
Could you tell us which files we have to change by wating the new release?
Thanks in advance
http://dev.virtuemart.net/attachments/download/929/com_virtuemart.3.0.6.3_extract_first.zip
Hello Milbo,
Just installed the new version and the problem is still there.
If I create an account with an username already used and I press the register button, the system comme back to the home shop page without error message.
+1 on this.
Although slight difference in that if user tries to register again with same or existing username we see the page refresh and a message saying 'Please register to checkout' and customer ends up going in circles.
vm3.0.6.2
Will try 3.0.6.3 when stable release.
I've fixed it... with a dirty hack but hey... if the VM-Developers don't get it run... ;)
J2.5:
libraries\joomla\database\table\user.php [227-228]
Add this line before the return:
JError::raiseWarning('1', JText::_('JLIB_DATABASE_ERROR_USERNAME_INUSE'));
libraries\joomla\database\table\user.php [241-242]
Add this line before the return:
JError::raiseWarning('1', JText::_('JLIB_DATABASE_ERROR_EMAIL_INUSE'));
J3:
libraries\joomla\table\user.php [231-233]
Add this line before the return:
JError::raiseWarning('1', JText::_('JLIB_DATABASE_ERROR_USERNAME_INUSE'));
libraries\joomla\table\user.php [247-259]
Add this line before the return:
JError::raiseWarning('1', JText::_('JLIB_DATABASE_ERROR_EMAIL_INUSE'));
Edit:
added missing '
Great work. Thanks!
Although you had a missing ' in the first J3 hack
Use:
J3:
libraries\joomla\table\user.php [231-233]
Add this line before the return:
JError::raiseWarning('1', JText::_('JLIB_DATABASE_ERROR_USERNAME_INUSE'));
libraries\joomla\table\user.php [247-259]
Add this line before the return:
JError::raiseWarning('1', JText::_('JLIB_DATABASE_ERROR_EMAIL_INUSE'));
I've now tried the latest version (J3.4, VM3.0.6.3) with a clear installation and it seems to be fixed (at least with the default template).
But all input-fields get cleared if there's an error.
At least in J2.5 VM2.6 the input-fields keep the values, even with my hack.
Hello All,
Thank you to try to solve this problem.
This hack is working for the Register and checkout page but it does not work if the customer want to create an account before add to cart.
I we try to create an account by using the virtuemart menu "Account maintenance" (eq. http://demo.virtuemart.net/account) we have no error message if the email or username is already used we are redirected to the Shop home page..
lol
Quote from: Dudebaker on March 20, 2015, 10:31:45 AM
I've fixed it... with a dirty hack but hey... if the VM-Developers don't get it run... ;)
No, you just did obsolete stuff. Hacking joomla is the worst you can do. Additionally you guys do not tell which joomla version you are using.
It is also fixed already and if you want to understand how I fixed it, learn to use the provided tools, they are there to help you.
http://dev.virtuemart.net/projects/virtuemart/repository/diff/trunk/virtuemart/administrator/components/com_virtuemart/models/user.php?utf8=%E2%9C%93&rev=8777&rev_to=8754
that is the fix.
Quote from: Milbo on March 22, 2015, 16:05:38 PM
No, you just did obsolete stuff.
That's the reason for calling it dirty... sorry for my nasty words, but such a serious bug which hasn't been fixed since month if not years?
But you're right, I found this lines after trying the latest version but didn't post it.
So guy's change the user.php file from virtuemart/models instead of the user.php file from joomla/libraries.
administrator/components/com_virtuemart/models/user.php [666]
change:
vmError(vmText::sprintf('JLIB_APPLICATION_ERROR_SAVE_FAILED',$user->getError()));
to:
$msg = vmText::sprintf('JLIB_APPLICATION_ERROR_SAVE_FAILED',$user->getError());
vmError($msg,$msg);
Up !
Modification is working fine for "Register and checkout" but it does not work for the creation of the new account. Test can be done here : http://demo.virtuemart.net/account
The customer has not to be oblige to buy something to create an account.
It becomes to be a critical issue ! If a customer want to create an account before buy something with an username already used and if he receives no error message during the registration, he will go away !
yepp Dudebaker, :-) The funny thing is, I felt in my own "security". vmError shows the info only to the administrator, to prevent that programmers reveal unintended sensitive data.
I must admit I dont understand, why it should not work with vm3.0.4 for the account maintenance, both uses the same model, the same function,...
Hey Milbo,
I'm trying to create an account with the same username since the beginning but in fact no new account can be created with the simple registration page.
It works for the Register and Chekout but not for the account maintenance.
Maybe that can help you.
Hallo Milbo,
Do you have a status about this topic. Now it's impossible to create a new account by using the virtuemart register form except for the register and checkout.
Did you give up ?
Thanks in advance
Quote from: julos08 on March 25, 2015, 14:08:46 PM
Hey Milbo,
I'm trying to create an account with the same username since the beginning but in fact no new account can be created with the simple registration page.
That is intended.
Quote from: julos08 on March 25, 2015, 14:08:46 PM
It works for the Register and Chekout but not for the account maintenance.
As guest it should "work", but you do not register then (check topic)