• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
      • Manage Subscriptions
      • FAQ
      • Support For
        • VaultWiki 4.x Series
        • VaultWiki.org Site
    • What's New?
    • Buy Now
    • Manual
    • 
    • Support
    • VaultWiki 3.x Series
    • Bug
    • Database error after deleting namespace

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Issue: Database error after deleting namespace

    • Issue Tools
      • View Changes
    1. issueid=1678 June 12, 2010 2:56 PM
      ctrlbrk ctrlbrk is offline
      Junior Member
      Database error after deleting namespace

      vb 3.8.5 vw 3.0.0

      Deleted a namespace. Got a database error. From there tried to re-create it and delete the forum manually, more database errors.

      From vb admin, everything looks fine. But when I try to make a post in this section (new article), it says forum is not accepting new posts (even though it is set to accept them).

      Attached in order of event.

      Code:
      Database error in vBulletin 3.8.5:
      
      Invalid SQL:
      
      					UPDATE forum
      					SET vault_type = 0
      					WHERE vault_type = 1
      						AND forumid IN ();
      
      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 ')' at line 4
      Error Number  : 1064
      Request Date  : Saturday, June 12th 2010 @ 02:47:50 PM
      Error Date    : Saturday, June 12th 2010 @ 02:47:50 PM
      Script        : http://www.bigmiketrading.com/bmtadmincp/vaultwiki_namespace.php?do=kill
      Referrer      : http://www.bigmiketrading.com/bmtadmincp/vaultwiki_namespace.php?do=remove&namespaceid=11
      IP Address    : 173.173.69.178
      Username      : Big Mike
      Classname     : vB_Database_MySQLi
      MySQL Version : 5.1.41-3ubuntu12.1-log
      Code:
      Database error in vBulletin 3.8.5:
      
      Invalid SQL:
      
      			SELECT thread.threadid, thread.title, thread.forumid, thread.iconid,
      				thread.prefixid, 
      				thread.firstpostid, post.pagetext, post.userid, post.dateline, post.attach,
      				thread.visible, thread.open, thread.sticky
      				, IF(lp.userid, lp.userid, thread.postuserid) AS newposterid
      				, art.groupid, art.languageid
      			FROM thread AS thread
      			LEFT JOIN post AS post ON (thread.firstpostid = post.postid)
      			LEFT JOIN post AS lp ON (lp.postid = thread.lastpostid AND lp.postid != thread.firstpostid)
      			LEFT JOIN vault_article AS art ON (art.threadid = thread.threadid)
      			WHERE thread.forumid IN ()
      			ORDER BY thread.dateline DESC
      			LIMIT 0,200;
      
      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 ')
      			ORDER BY thread.dateline DESC
      			LIMIT 0,200' at line 11
      Error Number  : 1064
      Request Date  : Saturday, June 12th 2010 @ 02:49:08 PM
      Error Date    : Saturday, June 12th 2010 @ 02:49:08 PM
      Script        : http://www.bigmiketrading.com/bmtadmincp/vaultwiki_namespace.php?do=rebuild&namespaceid=11&meta=57,58&types=[0]=&types[1]=1&parents[0]=57&parents[1]=58&postcache=,11
      Referrer      : http://www.bigmiketrading.com/bmtadmincp/vaultwiki_namespace.php?do=dosave
      IP Address    : 173.173.69.178
      Username      : Big Mike
      Classname     : vB_Database_MySQLi
      MySQL Version : 5.1.41-3ubuntu12.1-log
      Mike
    Issue Details
    Issue Number 1678
    Issue Type Bug
    Project VaultWiki 3.x Series
    Category Namespaces
    Status Fixed
    Priority 2 - Fatal / Database Errors
    Affected Version 3.0.0
    Fixed Version 3.0.1
    Milestone VaultWiki 3.0.5
    Software DependencyvBulletin 3.8
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. June 12, 2010 3:01 PM
      ctrlbrk ctrlbrk is offline
      Junior Member
      Screen 1 of the namespace in question:


      Screen 2 of the forum manager interface:


      Mike
      Reply Reply  
    2. June 12, 2010 4:36 PM
      pegasus pegasus is offline
      VaultWiki Team
      How far in the process of creating a post does it let you go?

      For example, does it stop you immediately after clicking the button that should open the editor, or does it give you the editor and not let you submit the post?

      Have you added "tools" to your nginx rewrites? I have seen this issue sometimes when rewrites haven't been configured properly for the forum.

      Also, the database errors might have resulted in the forum never being added to the datastore, so it would return !cancontainthreads. Go to AdminCP > Maintenance Tools > Update Counters > Rebuild Forum Information to see if that helps.
      Reply Reply  
    3. June 12, 2010 4:48 PM
      ctrlbrk ctrlbrk is offline
      Junior Member
      Hi pegasus,

      Yes, I added the nginx rewrite.

      I was able to solve this by using the vb admin cp to delete the forum. I am not sure what magical order I ended up trying that worked, because I had tried to do it a few times. But one time it let me actually delete it. Then I was able to re-create everything with the database error, and I created a test article and it worked.

      So you can close this for me for now. The very first CODE section in post #1 is what started it all, notice the invalid MySQL generated by vaultwiki.

      Thx and have a good weekend,
      Mike
      Reply Reply  
    4. June 12, 2010 5:04 PM
      pegasus pegasus is offline
      VaultWiki Team
      The only natural situation I can imagine the first database error occurring is if you delete the namespace's forum first from the forum manager, then delete the namespace afterward. There are probably other situations, like if the datastore cache hasn't updated for some reason, but that's all I can think of for now.

      Perhaps locking down the cause would help. Why did you delete the namespace?

      Other possibilities: Was the namespace's forum a child of a different namespace's forum? This option is allowed but hasn't been tested extensively.

      To prevent the database errors should the datastore be outdated again during the delete action. In vault/dm/namespace.php, find:
      Code:
      				$children .= ',' . implode(',', $childlist);
      
      				$this->rebuild['meta'] = array(
      					array(1, 0),
      					array($thisnamespace['forumid'], $thisnamespace['forumid']) // not used in this case
      				);
      Replace with:
      Code:
      				if ($childlist)
      				{
      					$children .= ',' . implode(',', $childlist);
      
      				$this->rebuild['meta'] = array(
      					array(1, 0),
      					array($thisnamespace['forumid'], $thisnamespace['forumid']) // not used in this case
      				);
      				}
      Any case that causes this would probably leave orphan data in the database, but now there will not be an error. Not really possible to fix completely until we do the database rewrite for 3.1.0.
      Reply Reply  
    5. June 12, 2010 5:13 PM
      ctrlbrk ctrlbrk is offline
      Junior Member
      I created it and checked the box to make it "special function - category". Since I am still playing and familiarizing myself with how everything works... Then I realized I didn't want this. I couldn't just undo the category, so I said to delete it. I did not delete it first from the forum admin.

      But it is working now so I've moved on for now.

      Mike
      Reply Reply  
    + Reply

    Assigned Users
    Loading Please Wait
    Tags
    Loading Please Wait
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 11:38 AM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2023 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2023 DragonByte Technologies Ltd.
    Copyright © 2008 - 2013 VaultWiki Team, Cracked Egg Studios, LLC.