Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2010
    Posts
    15
    Plugin Contributions
    0

    Default Field doesn't have a default value

    Hi,

    Suddenly my Zen-Cart is giving this error when a new customer tries creating an account:

    1364 Field 'customers_gender' doesn't have a default value
    in:
    [INSERT INTO zencustomers (customers_firstname, customers_lastname, customers_email_address, customers_nick, customers_telephone, customers_fax, customers_newsletter, customers_email_format, customers_default_address_id, customers_password, customers_authorization) VALUES ('XXXx', 'XXXXx', '[email protected]', '', '9999999999', '', '0', 'TEXT', '0', '7176b007a59e92c2b749d218243fd238:87', '0')]

    My web host recently moved the site to a new server, but they tell me this is a code issue. Nothing else has changed recently.

    When I change the table default value for customers_gender to null, it works, but I then get the same error for customers_referral. Change that default to null, and I get the same error for customers_paypal_payerid.

    Any help is greatly appreciated!

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Field doesn't have a default value

    Chances are that your host's "move to a new server" DID in fact change something significant: the MySQL software version, or at least its operating mode ..... and now it's enforcing some of the stricter rules that newer MySQL versions enforce out-of-the-box.

    1. The BEST fix is to upgrade to a modern version of Zen Cart that works with your more modern version of MySQL. Your Zen Cart version is ancient.

    2. a TEMPORARY bandage is to set default values on those respective fields, after carefully inspecting what a suitable sane default would be for each.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. 1364 Field 'query_keys_list' doesn't have a default value
    By geekgirl in forum Upgrading from 1.3.x to 1.3.9
    Replies: 3
    Last Post: 13 Apr 2009, 12:54 AM
  2. Is it possible to have a default value in text attributes?
    By rbobzin in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 12 Sep 2008, 09:20 PM
  3. Token field doesn't have a label
    By quentinjs in forum PayPal Express Checkout support
    Replies: 2
    Last Post: 28 Jan 2008, 10:55 PM
  4. BLOB/TEXT column 'products_options_values' can't have a default value ??
    By quantumfusion in forum Installing on a Windows Server
    Replies: 16
    Last Post: 26 Jan 2008, 01:40 AM
  5. 1101 BLOB/TEXT column can't have a default value
    By tkroh in forum Installing on a Windows Server
    Replies: 3
    Last Post: 27 Dec 2006, 10:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg