Results 1 to 2 of 2

Thread: Unable to upload module

  1. #1

    Default Unable to upload module

    I created a module on my test db with custom options and had things working properly. I then downloaded the module so I could move it to my live forum and ran into this during the upload
    Database error in vBulletin 3.5.2:
    Invalid SQL:
    INSERT INTO adv_setting (varname, grouptitle, value, defaultvalue, optioncode, displayorder) VALUES ('portal_rss_qualifier', 'adv_portal_rss', 'return !preg_match("/story/i", $rss_item['DESCRIPTION']);', '', 'textarea', '8');
    MySQL Error  : 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 'DESCRIPTION']);', '', 'textarea', '8')' at line 1 Error Number : 1064
    Date         : Wednesday, December 14th 2005 @ 02:22:17 AM
    It appears that while it's OK to enter quotes into the text areas and download them it fails when trying to upload them again.
    Tom Morris
    Porsche Boxster discussion forum.
    Today's Conservative discussion forum.

  2. #2
    Join Date
    Jan 2004
    Georgia, USA

    Default Re: Unable to upload module

    I'm surprised someone hasn't run into this problem before. If you'll look in your admincp/vba_cmps_admin.php file for this code:
    PHP Code:
                    $db->query_write("INSERT INTO " TABLE_PREFIX "adv_setting (varname, grouptitle, value, defaultvalue, optioncode, displayorder) VALUES ('$varname', 'adv_portal_$module[identifier]', '$setting[value]', '$setting[defaultvalue]', '" addslashes($setting['optioncode']) . "', '$setting[displayorder]')"); 
    And replace with this:
    PHP Code:
                    $db->query_write("INSERT INTO " TABLE_PREFIX "adv_setting (varname, grouptitle, value, defaultvalue, optioncode, displayorder) VALUES ('$varname', 'adv_portal_$module[identifier]', '" addslashes($setting['value']) . "', '" addslashes($setting[defaultvalue]) . "', '" addslashes($setting['optioncode']) . "', '$setting[displayorder]')"); 
    Then that should take care of the problem.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Module Request: Upload/Download Module
    By SantaMayCry in forum Module & Modification Discussion & Requests
    Replies: 1
    Last Post: 12-05-2005, 03:14 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