Jump to content

Error given when creating new customer account


Recommended Posts

Hi,
I'm just starting out in Prestashop and have noticed when I create a new customer account, after entering all the details I get the following error:




There is 1 error :

1. an error occurred while creating your account

« Back


Yet all the details have been entered correctly. If however I try to logon using these new details , the customer is logged on OK. Am or have I done something wrong somerwhere. Have looked through the previous forum posts but unable to find an answer. Hope someone is able to help.

Many Thanks
David - Blend Tea and Coffee

Link to comment
Share on other sites

  • 3 weeks later...

Hi
I suddenly have the same problem! Didn't yesterday. Have been trying to upload a customer csv file (which didn't work!) but wonder if I've messed something up!
I am getting the same error but the customers details are appearing in the back office and phpmyadmin. No emails are being sent.
Anyone help?

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

Hi

There is a least 10 different posts in french or english and not one seems to find an answer.

That's why I am posting on the english side, I said to myself, may be I get more lucky, well hell no, same old song on all the forum.

authentification.php says

            if (intval($country->contains_states) AND !intval($address->id_state))
               $errors[] = Tools::displayError('this country require a state selection');
           else
           {
               $customer->active = 1;
               if (!$customer->add())
                   $errors[] = Tools::displayError('an error occurred while creating your account');
               else
               {
                   $address->id_customer = intval($customer->id);
                   if (!$address->add())
                       $errors[] = Tools::displayError('an error occurred while creating your address');
                   else



What does :

$customer->active = 1;
if (!$customer->add())

MEANS !!!!!!!!

Link to comment
Share on other sites

After some tries here is what I did

As what I can understand (I am not a programmer),

IF

$customer->active = 1;
if (!$customer->add()) 



Means after customer is added he becomes active, if this is true I do not understand what the error message is doing there, I also did not find the way to download PS old version to compare so I did this :

                $customer->active = 1;
               if (!$customer->add())
//                    $errors[] = Tools::displayError('an error occurred while creating your account');
//                else
               {



The error of course does not appear, the customer is connected to its account and is landing on the my-account page.
So for me it works now, I will see tomorrow if I have less customers failing at opening an account.

If someone can check with an old version and let me know, or is good programmer to explain what these two lines means.

Link to comment
Share on other sites

  • 1 month later...

I'm getting the same error message but only if the customer's e-mail address contains the word "union". This seems to be either a scripting error or some sort of a database error since "UNION" is a MySQL keyword. If the customer's e-mail does not contain the word "union" but his address does, then the customer registers but gets "error while creating your address".

Link to comment
Share on other sites

Found the problem: in /classes/Db.php on line 49:

private static $_blacklist = 'UNION|LOAD_FILE|OUTFILE|DUMPFILE|ESCAPED|TERMINATED|CASCADE|INFILE|X509|TRIGGER|REVOKE';

Any of the above keywords in any pieces of the new customer's information will produce this error. This line must have something to do with hack protection so think twice before removing any keywords.

Link to comment
Share on other sites

  • 6 months later...
  • 5 months later...

Guys I had the same problem when resetting all my customers and orders via MyPHPAdmin. It might be the same for some of you who have upgraded your shop from older versions to v.1.3.0 and above.

In old versions of Prestashop, the table 'ps_customer_group' didn't exist in the database, and I think in some cases, the upgrade is not creating that table. Therefore you get some errors when creating new users.

If you try and manually create a new user from the backend and get and error as well (duplicate entry), I think the problem is definitely with that table in the DB. I wouldn't know how to fix it in systems that already have customers, but if, like me, you just want to reset all your clients and orders (without deleting settings, products, etc.) simply run this code in the SQL:

TRUNCATE TABLE `ps_customer`;
TRUNCATE TABLE `ps_address`;
TRUNCATE TABLE `ps_orders`;
TRUNCATE TABLE `ps_order_detail`;
TRUNCATE TABLE `ps_order_discount`;
TRUNCATE TABLE `ps_order_history`;
TRUNCATE TABLE `ps_message`;
TRUNCATE TABLE `ps_cart`;
TRUNCATE TABLE `ps_cart_product`;
TRUNCATE TABLE `ps_cart_discount`; 
TRUNCATE TABLE `ps_customer_group`;



That will wipe all the customers and orders info (and hopefully fix the problem)

If you're upgrading, make sure the 'ps_customer_group' table exists. Otherwise you can copy it from an empty installation (not sure if there's an easier way to do this?).

Hope this helps,

Carlos

Link to comment
Share on other sites

  • 2 months later...
TRUNCATE TABLE `ps_customer`;
TRUNCATE TABLE `ps_address`;
TRUNCATE TABLE `ps_orders`;
TRUNCATE TABLE `ps_order_detail`;
TRUNCATE TABLE `ps_order_discount`;
TRUNCATE TABLE `ps_order_history`;
TRUNCATE TABLE `ps_message`;
TRUNCATE TABLE `ps_cart`;
TRUNCATE TABLE `ps_cart_product`;
TRUNCATE TABLE `ps_cart_discount`; 
TRUNCATE TABLE `ps_customer_group`;

executing this query solves my problem, thanks! :)

Link to comment
Share on other sites

  • 4 months later...

I am having the same issue from a upgrade from 1.3.0.1 to 1.4.4.0, i have checked with the default prestashop theme and still the same problem. After the upgrade exisitng customers can login but new ones can't. with this error 1.An error occurred while creating your account

 

Please can someone help me on this as i have upgraded my live store and now have this problem after many hours of testing on my test site everything was ok and now not on the live as this is stopping me

 

Regards,

 

Mark.

Link to comment
Share on other sites

  • 1 year later...

TRUNCATE TABLE `ps_customer`;
TRUNCATE TABLE `ps_address`;
TRUNCATE TABLE `ps_orders`;
TRUNCATE TABLE `ps_order_detail`;
TRUNCATE TABLE `ps_order_discount`;
TRUNCATE TABLE `ps_order_history`;
TRUNCATE TABLE `ps_message`;
TRUNCATE TABLE `ps_cart`;
TRUNCATE TABLE `ps_cart_product`;
TRUNCATE TABLE `ps_cart_discount`;
TRUNCATE TABLE `ps_customer_group`;

executing this query solves my problem, thanks! :)

 

Didnt work! <_<

had the problem on 1.5.4.0 and 1.5.4.1 after the upgrade from 1.4

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...