Database error - templatesetid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Lats
    Senior Member
    • Mar 2002
    • 3671

    Database error - templatesetid

    I haven't noticed anyone else receiving this error...
    Invalid SQL: SELECT templatesetid,replacementsetid,userselect FROM style WHERE styleid='1'
    mysql error: Unknown column 'templatesetid' in 'field list'
    mysql error number: 1054
    ... at the ACP login prompt, and index.php.

    This is after a successful upgrade from 2.3, and also from a fresh install.

    Any thoughts?
    Lats...
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 74165

    #2
    Make sure your style table looks like this:
    Code:
    CREATE TABLE `style` (
      `styleid` smallint(5) unsigned NOT NULL auto_increment,
      `title` varchar(250) NOT NULL default '',
      `parentid` smallint(6) NOT NULL default '0',
      `parentlist` varchar(250) NOT NULL default '',
      `templatelist` mediumtext NOT NULL,
      `css` mediumtext NOT NULL,
      `stylevars` mediumtext NOT NULL,
      `replacements` mediumtext NOT NULL,
      `userselect` smallint(5) unsigned NOT NULL default '1',
      `displayorder` smallint(5) unsigned NOT NULL default '0',
      PRIMARY KEY  (`styleid`)
    ) TYPE=MyISAM AUTO_INCREMENT=2 ;
    And make sure that you deleted all your 2.3 files before uploading the 3.0 files.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment

    • Lats
      Senior Member
      • Mar 2002
      • 3671

      #3
      Originally posted by Wayne Luke
      And make sure that you deleted all your 2.3 files before uploading the 3.0 files.
      Thanks Wayne, the table does look like and one of the attempts was from a fresh install without existing tables.

      The SQL statement seems out of place.
      Lats...

      Comment

      • Lats
        Senior Member
        • Mar 2002
        • 3671

        #4
        Just to update, this error only occurred on my local test box running MySQL 3.23.49 however, it works fine on a live server.
        Lats...

        Comment

        • Mike Sullivan
          Former vBulletin Developer
          • Apr 2000
          • 13327
          • 3.6.x

          #5
          I can't find that query in any of the code, not to mention that those fields don't exist anymore. So, make sure all the 2.3.0 files have been replaced and if you have any code in phpinclude, that it's compliant.

          Comment

          • mjames
            Senior Member
            • Nov 2000
            • 1076
            • 3.8.x

            #6
            I'm also receiving this error:
            Database error in vBulletin :

            Invalid SQL: SELECT templatesetid,replacementsetid,userselect FROM style WHERE styleid='1' or styleid=1 ORDER BY styleid DESC
            mysql error: Unknown column 'templatesetid' in 'field list'

            mysql error number: 1054

            Date: Monday 04th of August 2003 03:21:39 PM
            Script: /scmb_new/forumdisplay.php?forumid=12
            Referer:
            I'm testing out beta 4. This is not on the actual site, only in e-mails. I thought it might have to do with using old vB2 styles and I changed all my test boards to the default vB3 styles.
            Last edited by mjames; Mon 4 Aug '03, 5:42pm.
            Marc James
            Sports Central — Beyond the Scores
            Sports Central Message Boards

            Comment

            • Mike Sullivan
              Former vBulletin Developer
              • Apr 2000
              • 13327
              • 3.6.x

              #7
              Same thing as I said above -- it's from 2.x files on a 3.x database.

              And testing out beta 3? I'd definitely recommend using beta 5.

              Comment

              • mjames
                Senior Member
                • Nov 2000
                • 1076
                • 3.8.x

                #8
                I'm sorry, I meant beta 4. I tested it earlier today before 5 came out. I didn't know when 5 was coming out, so just went ahead with it.

                And I doubt it's the 2.x files because I created a new directory and used a test database for all this. The only possibility is that the test database I used was one previously being used for vB2. I couldn't create a new test database because I don't have room on my virtual server for another 170+ MB file (I have over 100,000 posts). Did I do something wrong?
                Marc James
                Sports Central — Beyond the Scores
                Sports Central Message Boards

                Comment

                • Mike Sullivan
                  Former vBulletin Developer
                  • Apr 2000
                  • 13327
                  • 3.6.x

                  #9
                  That query is definitely "vB2-style", but it looks exactly like a query in vB2's global.php (in the root directory). Locally, it's on line 272, but it might be slightly different.

                  Did you put any different code in your phpinclude template? (Actually, I'm not 100% sure that this would even be a problem, because the template's name changed to phpinclude_start.)

                  Also, search through your templates for "SELECT templatesetid" -- if you get any hits (in phpinclude-type templates), I'd recommend updating/removing them.

                  Comment

                  • mjames
                    Senior Member
                    • Nov 2000
                    • 1076
                    • 3.8.x

                    #10
                    I haven't altered any code or anything: http://sports-central.org/scmb_vb3

                    I'll search through my templates for that.
                    Marc James
                    Sports Central — Beyond the Scores
                    Sports Central Message Boards

                    Comment

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