Announcement

Collapse
No announcement yet.

Database Error (Duplicate entry) when updating Styles

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Database Error (Duplicate entry) when updating Styles

    Hi,

    Getting the following error when trying to save 'all style options' on a newly installed 3.8.1 PL1 board - no plugins installed at all - having altered the second 'extra CSS' field.

    Any ideas?

    Ollie

    Code:
    Database error in vBulletin 3.8.1:
    
    Invalid SQL:
    
    					INSERT INTO template
    					(styleid, templatetype, title, dateline, username, template)
    					VALUES
    					(1, 'css', 'EXTRA2', 1237322251, 'Ollie', 'a:1:{s:3:\"all\";s:190:\"#texturebar {\r\n  color: #000000;\r\n  background-color: #3e57d8;\r\n  background-image: url(../common_images/texture_bar.gif);\r\n  background-position: 0px 0px;\r\n  background-repeat: repeat-x;\r\n}\";}');
    
    MySQL Error   : Duplicate entry 'EXTRA2-1-css' for key 2
    Error Number  : 1062
    
    ...
    
    Classname     : vB_Database_MySQLi
    MySQL Version : 5.0.67-community
    GoXplore! | The Big Design Company | Athena Protects

  • #2
    Try this:

    Admin CP -> Maintenance -> Repair/Optimize Tables -> Fix Unique Indexes
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment


    • #3
      Originally posted by Steve Machol View Post
      Try this:

      Admin CP -> Maintenance -> Repair/Optimize Tables -> Fix Unique Indexes
      Doesn't seem to have helped - still getting the same error. Fix uniques said that the table 'already had a unique index'
      GoXplore! | The Big Design Company | Athena Protects

      Comment


      • #4
        Then this is likely due to a modification.

        To troubleshoot this, first reupload all the original vB non-image files (except install.php). Make sure you upload these in ASCII format and overwrite the ones on the server. Also be sure to upload the admincp files to whichever directory you have set in your config.php file. Then run 'Suspect File Versions' in Diagnostics to make sure you have all the original files for your version and that none show 'File does not contain expected contents':

        Admin CP -> Maintenance -> Diagnostics -> Suspect File Versions


        [Note: In some cases you may also need to remove any of the listed .xml files in the includes/xml directory.]

        Next, disable all plugins.

        Note: To temporarily disable the plugin system, edit config.php and add this line right under <?php

        define('DISABLE_HOOKS', true);


        Then if you still have this problem, create a new style and choose no parent style. This will force it to use the default templates. Finally empty your browser cache, close all browser windows then try again. Make sure you change to the new style and view your forums with it.

        Do you have the same problem?
        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
        Change CKEditor Colors to Match Style (for 4.1.4 and above)

        Steve Machol Photography


        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X