No announcement yet.

Problem updating forumhome template v2.2.9

  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem updating forumhome template v2.2.9

    When trying to update the forumhome template, I get the following error.

    PHP Code:
    Database error in vBulletin Control Panel 2.2.9:
    Invalid SQLINSERT INTO template (templateid,templatesetid,title,templateVALUES (NULL,'1','forumhome','{htmldoctype}
     <!-- no cache headers -->
     <meta http-equiv=\"Pragma\" content=\"no-cache\">
     <meta http-equiv=\"no-cache\">
     <meta http-equiv=\"Expires\" content=\"-1\">
     <meta http-equiv=\"Cache-Control\" content=\"no-cache\">
     <!-- end no cache headers -->
     <meta name=\"keywords\" content=\"vbulletin,forum,bbs,discussion,jelsoft\">
     <meta name=\"description\" content=\"$bbtitle is a discussion forum powered by vBulletin. To visit the forum, go to $bburl/ . To find out about vBulletin, go to [url=][/url] .\">
     <title>$bbtitle - powered by vBulletin</title>
    <!-- text -->
    <table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"{contenttablewidth}\" {tableinvisibleextra} align=\"center\">
    <tr valign=\"top\">
     <td><img src=\"{imagesfolder}/vb_bullet.gif\" border=\"0\" align=\"middle\" alt=\"$bbtitle : Powered by vBulletin version $templateversion\">
     <td align=\"right\"><smallfont>$welcometext<br><b>$newposts</b></smallfont></td>
    <table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"{contenttablewidth}\" {tableinvisibleextra} align=\"center\">
    <tr valign=\"bottom\">
     Members: $numbermembers, Threads: $totalthreads, Posts: $totalposts<br>
     Welcome to our newest member, <a href=\"member.php?s=$session[sessionhash]&action=getinfo&userid=$newuserid\">$newusername</a>
     <td align=\"right\"><smallfont>
     The time now is $timenow.<br>
     You last visited: $bbuserinfo[lastvisitdate].
    <!-- /text -->
    <!-- main -->
    <table cellpadding=\"{tableouterborderwidth}\" cellspacing=\"0\" border=\"0\" bgcolor=\"{tablebordercolor}\" {tableouterextra} width=\"{contenttablewidth}\" align=\"center\"><tr><td>
    <table cellpadding=\"4\" cellspacing=\"{tableinnerborderwidth}\" border=\"0\" {tableinnerextra} width=\"100%\">
    <tr align=\"center\">
      <td bgcolor=\"{tableheadbgcolor}\"><smallfont>&nbsp;</smallfont></td>
      <td bgcolor=\"{tableheadbgcolor}\" width=\"80%\" align=\"left\"><smallfont color=\"{tableheadtextcolor}\"><b>Forum</b></smallfont></td>
      <td bgcolor=\"{tableheadbgcolor}\"><smallfont color=\"{tableheadtextcolor}\"><b>Posts</b></smallfont></td>
      <td bgcolor=\"{tableheadbgcolor}\"><smallfont color=\"{tableheadtextcolor}\"><b>Threads</b></smallfont></td>
      <td bgcolor=\"{tableheadbgcolor}\" nowrap><smallfont color=\"{tableheadtextcolor}\"><b>Last Post</b></smallfont></td>
      <td bgcolor=\"{tableheadbgcolor}\" width=\"20%\"><smallfont color=\"{tableheadtextcolor}\"><b>Moderator</b></smallfont></td>
    <!-- /main -->
    <!-- timezone/login-->
    <table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"{contenttablewidth}\" {tableinvisibleextra} align=\"center\">
    <tr valign=\"top\">
      <td align=\"right\">$logincode</td>
    <!-- /timezone/login -->
    <!-- icons -->
    <table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"{contenttablewidth}\" {tableinvisibleextra} align=\"center\">
     <td align=\"center\">
     <img src=\"{imagesfolder}/on.gif\" border=\"0\" alt=\"On\" align=\"absmiddle\">
     <b><smallfont>New posts</smallfont></b>
     <img src=\"{imagesfolder}/off.gif\" border=\"0\" alt=\"Off\" align=\"absmiddle\">
     <b><smallfont>No new posts</smallfont></b>
     <img src=\"{imagesfolder}/offlock.gif\" border=\"0\" alt=\"Closed Forum\" align=\"absmiddle\">
     <b><smallfont>A closed forum</smallfont></b>
    <!-- /icons -->
    mysql errorDuplicate entry '65535' for key 1
    mysql error number
    Monday 20th of January 2003 09:07:33 PM
    : [url=][/url]
    Referer: [url=][/url] 
    I was able to update other templates. I'm not sure why the query is doing an insert and not an update.

    I ran this query on my db and got only one row.

    PHP Code:
    [b][color=#990099]SELECT[/color][/b] [color=#008000]`templateid`[/color] [color=#ff00ff],[/color] [color=#008000]`templatesetid`[/color] [color=#ff00ff],[/color] [color=#008000]`title`[/color] [color=#ff00ff],[/color] [color=#008000]`template`[/color] 
    [b][color=#990099]FROM[/color][/b] [color=#008000]`template`[/color] 
    [b][color=#990099]WHERE[/color][/b] [color=#008080]1[/color] [b][color=#990099]AND[/color][/b] [color=#008000]`title`[/color] [color=#ff00ff]=[/color] [color=#008000]'forumhome'[/color] [b][color=#990099]LIMIT[/color][/b] [color=#008080]0[/color][color=#ff00ff],[/color] [color=#008080]30[/color] 
    Regards - John
    Customer info in profile

  • #2
    Reupload the original template.php file from the zip file. Make sure you upload in ASCII and overwrite the one on the server.

    If you still have a problem, then try running repair.php.
    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.


    • #3
      Hi Steve,

      Actually, it appears that the problem was the auto_increment column in the template table which is a small integer had reached 65535 which must be the max value. Issuing an alter table command to reset the value to 1 and reloading all the templates worked.

      Does that make any sense?
      Regards - John
      Customer info in profile


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