1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Smilies MYSQL error

Discussion in 'Troubleshooting and Problems' started by CommanderMadi, Feb 6, 2015.

  1. CommanderMadi

    CommanderMadi Member

    Code:
    Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Unknown column 'display_order' in 'order clause' - library/Zend/Db/Statement/Mysqli.php:77
    Code:
    Stack Trace
    #0 /home3/madi/public_html/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('\n\t\t\tSELECT *\n\t\t...')
    #1 /home3/madi/public_html/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), '\n\t\t\tSELECT *\n\t\t...')
    #2 /home3/madi/public_html/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('\n\t\t\tSELECT *\n\t\t...')
    #3 /home3/madi/public_html/library/XenForo/Model.php(219): Zend_Db_Adapter_Abstract->query('\n\t\t\tSELECT *\n\t\t...', Array, 2)
    #4 /home3/madi/public_html/library/XenForo/Model/Smilie.php(72): XenForo_Model->fetchAllKeyed('\n\t\t\tSELECT *\n\t\t...', 'smilie_id')
    #5 /home3/madi/public_html/library/XenForo/Model/Smilie.php(422): XenForo_Model_Smilie->getAllSmilies()
    #6 /home3/madi/public_html/library/XenForo/ControllerAdmin/Smilie.php(24): XenForo_Model_Smilie->getAllSmilieCategoriesWithSmilies()
    #7 /home3/madi/public_html/library/XenForo/FrontController.php(347): XenForo_ControllerAdmin_Smilie->actionIndex()
    #8 /home3/madi/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #9 /home3/madi/public_html/admin.php(13): XenForo_FrontController->run()
    #10 {main}

    Code:
    Request State
    array(3) {
    ["url"] => string(39) "https://simsgate.com/admin.php?smilies/"
    ["_GET"] => array(1) {
    ["smilies/"] => string(0) ""
    }
    ["_POST"] => array(0) {
    }
    }
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. CommanderMadi

    CommanderMadi Member

  4. Brogan

    Brogan XenForo Moderator Staff Member

    Drop the xf_smilie table and run this query:
    Code:
    CREATE TABLE xf_smilie (
        smilie_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
        title VARCHAR(50) NOT NULL,
        smilie_text TEXT NOT NULL,
        image_url VARCHAR(200) NOT NULL,
        sprite_mode TINYINT UNSIGNED NOT NULL DEFAULT 0,
        sprite_params TEXT NOT NULL,
        smilie_category_id INT UNSIGNED NOT NULL DEFAULT 0,
        display_order INT UNSIGNED NOT NULL DEFAULT 1,
        display_in_editor TINYINT UNSIGNED NOT NULL DEFAULT 1,
        PRIMARY KEY (smilie_id),
        KEY display_order (display_order)
    ) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
     
  5. CommanderMadi

    CommanderMadi Member

    Thanks but it deleted all smilies.
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    It would - the table was deleted.

    As the instructions on that resource state:
    Note: I would recommend everybody to take a backup of your database before importing the file. And if you to add them along-side with some other smilies, I am afraid you have to do it manually from your ACP instead of importing the SQL file.

    It specifically mentions that the table is dropped:
    You will need to recreate them.

    In future, make sure you read and heed any instructions when installing add-ons/resources to avoid even bigger problems.
     
  7. CommanderMadi

    CommanderMadi Member

    I made a backup already but would hoping for a fix to add these classic smilies. Is there an XML where I can get the default set of XF stock smilies?
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    Code:
    INSERT INTO xf_smilie
        (display_order, title, smilie_text, image_url, sprite_mode, sprite_params)
    VALUES
        (10,  'Smile', ':)\n:-)\n(:', 'styles/default/xenforo/xenforo-smilies-sprite.png', 1, 'a:4:{s:1:\"w\";i:18;s:1:\"h\";i:18;s:1:\"x\";i:0;s:1:\"y\";i:0;}'),
        (20,  'Wink', ';)', 'styles/default/xenforo/xenforo-smilies-sprite.png', 1, 'a:4:{s:1:\"w\";i:18;s:1:\"h\";i:18;s:1:\"x\";i:-60;s:1:\"y\";i:-21;}'),
        (30,  'Frown', ':(', 'styles/default/xenforo/xenforo-smilies-sprite.png', 1, 'a:4:{s:1:\"w\";i:18;s:1:\"h\";i:18;s:1:\"x\";i:-40;s:1:\"y\";i:-42;}'),
        (40,  'Mad', ':mad:\n>:(\n:@', 'styles/default/xenforo/xenforo-smilies-sprite.png', 1, 'a:4:{s:1:\"w\";i:18;s:1:\"h\";i:18;s:1:\"x\";i:-60;s:1:\"y\";i:0;}'),
        (50,  'Confused', ':confused:', 'styles/default/xenforo/xenforo-smilies-sprite.png', 1, 'a:4:{s:1:\"w\";i:18;s:1:\"h\";i:18;s:1:\"x\";i:-40;s:1:\"y\";i:-21;}'),
        (60,  'Cool', ':cool:\n8-)', 'styles/default/xenforo/xenforo-smilies-sprite.png', 1, 'a:4:{s:1:\"w\";i:18;s:1:\"h\";i:18;s:1:\"x\";i:-40;s:1:\"y\";i:0;}'),
        (70,  'Stick Out Tongue', ':p\n:P\n:-p\n:-P', 'styles/default/xenforo/xenforo-smilies-sprite.png', 1, 'a:4:{s:1:\"w\";i:18;s:1:\"h\";i:18;s:1:\"x\";i:-20;s:1:\"y\";i:-21;}'),
        (80,  'Big Grin', ':D', 'styles/default/xenforo/xenforo-smilies-sprite.png', 1, 'a:4:{s:1:\"w\";i:18;s:1:\"h\";i:18;s:1:\"x\";i:-20;s:1:\"y\";i:0;}'),
        (90,  'Eek!', ':eek:\n:o', 'styles/default/xenforo/xenforo-smilies-sprite.png', 1, 'a:4:{s:1:\"w\";i:18;s:1:\"h\";i:18;s:1:\"x\";i:-20;s:1:\"y\";i:-42;}'),
        (100, 'Oops!', ':oops:', 'styles/default/xenforo/xenforo-smilies-sprite.png', 1, 'a:4:{s:1:\"w\";i:18;s:1:\"h\";i:18;s:1:\"x\";i:0;s:1:\"y\";i:-42;}'),
        (110, 'Roll Eyes', ':rolleyes:', 'styles/default/xenforo/xenforo-smilies-sprite.png', 1, 'a:4:{s:1:\"w\";i:18;s:1:\"h\";i:18;s:1:\"x\";i:0;s:1:\"y\";i:-21;}'),
        (120, 'Er... what?', 'o_O\nO_o\no.O\nO.o', 'styles/default/xenforo/xenforo-smilies-sprite.png', 1, 'a:4:{s:1:\"w\";i:18;s:1:\"h\";i:18;s:1:\"x\";i:-80;s:1:\"y\";i:-42;}')
    ;
     
  9. CommanderMadi

    CommanderMadi Member

    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"' at line 16
     
  10. Brogan

    Brogan XenForo Moderator Staff Member

    Remove the " from the end.
     
  11. CommanderMadi

    CommanderMadi Member

Share This Page