Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,589
    Plugin Contributions
    30

    Default ERROR: Cannot insert configuration_key "" because it already exists, empty db key

    In the SQL patch tool, I get the error "ERROR: Cannot insert configuration_key "" because it already exists", with perfectly valid SQL.

    In the configuration table, there is an record with a configuration_title "Installed Modules" which has an empty configuration_key.
    If I delete this record or put any value in its configuration_key, the SQL patch tool will process the sql happily.

    This record is inserted by admin/modules.php, I believe related to the install/uninstall of ZC internal modules (payment, shipping etc.).

    I know I have previously commented on this and deleted the empty entry but is has re-appeared so there is something that requires investigation, whether its the creation of this incomplete record or the behaviour of the SQL tool.
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

  2. #2
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: ERROR: Cannot insert configuration_key "" because it already exists, empty db key

    To help out: previously identified at: http://www.zen-cart.com/showthread.p...04#post1233704

    That thread references this one per torvista's follow-on search and identification.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: ERROR: Cannot insert configuration_key "" because it already exists, empty db key

    Quote Originally Posted by torvista View Post
    with perfectly valid SQL.
    Can you share the specific SQL statement?

    I'm guessing there's a conflict in how it's getting parsed, so knowing exactly what you're submitting will help in determining a fix.

    (It shouldn't matter whether there's an existing blank key already in the db. That's not the issue.)
    .

    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.

  4. #4
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,589
    Plugin Contributions
    30

    Default Re: ERROR: Cannot insert configuration_key "" because it already exists, empty db key

    here is one
    INSERT INTO configuration ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function ) VALUES
    ( 'User Tracking for Catalog Enabled', 'USER_TRACKING_CONFIG_ENABLED', 'true', 'Enable catalog user tracking (each click will be logged)?', 100, 1, NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),' );
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

  5. #5
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: ERROR: Cannot insert configuration_key "" because it already exists, empty db key

    Quote Originally Posted by torvista View Post
    here is one
    Worked as provided on a zc 1.5.4 install that has Stock by attributes only installed, default template. No error message. Confirmed by going to configuration panel and changing gID to 100, one item in list.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,589
    Plugin Contributions
    30

    Default Re: ERROR: Cannot insert configuration_key "" because it already exists, empty db key

    yes, it does work...unless there is an unrelated record in the configuration table with an empty configuration_key.

    There should not be a record in the configuration table with an empty configuration_key, but there is, as detailed in my first post.

    So firstly, SQL tool should not choke on the query because of an unrelated empty field and secondly, how does an empty field get inserted by modules.php?

    So maybe there are two bugs here...
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

 

 

Similar Threads

  1. v154 Blank screen after curesec-com file insert ("headers already sent")
    By RixStix in forum General Questions
    Replies: 4
    Last Post: 13 Sep 2015, 09:58 PM
  2. v139h Cannot insert configuration_key "" because it already exists
    By RixStix in forum Upgrading to 1.5.x
    Replies: 24
    Last Post: 13 Mar 2015, 11:34 AM
  3. v151 "Filename cannot be empty in" error.. site not working
    By abcisme in forum General Questions
    Replies: 6
    Last Post: 6 Jan 2015, 08:02 PM
  4. Skipped:cannot .... because it already exists
    By Wilfred in forum Installing on a Linux/Unix Server
    Replies: 26
    Last Post: 22 Nov 2010, 08:48 PM
  5. Replies: 0
    Last Post: 7 Dec 2008, 02:31 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR