• 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
    • VaultWiki and the attachment system

    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: VaultWiki and the attachment system

    • Issue Tools
      • View Changes
    1. issueid=2325 June 7, 2011 11:41 PM
      TundraSoul TundraSoul is offline
      New Member
      VaultWiki and the attachment system

      Does VaultWiki touch the vB attachment system at all?

      Code:
      Database error in vBulletin 4.1.3:
      
      Invalid SQL:
      
                             SELECT fd.filedataid
                             FROM attachment AS acu
                             INNER JOIN filedata AS fd ON (acu.filedataid = fd.filedataid)
                             LEFT JOIN thread AS thread ON (thread.firstpostid = acu.contentid AND thread.title LIKE acu.filename)
                             WHERE acu.filedataid = 16571
                                     AND acu.userid = 7681
                                     AND thread.forumid IN ()
                             LIMIT 1;
      
      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 ')
                             LIMIT 1' at line 7
      Error Number  : 1064
      Request Date  : Tuesday, June 7th 2011 @ 07:36:38 PM
      Error Date    : Tuesday, June 7th 2011 @ 07:36:38 PM
      Script        : http://www.mysite.com/asset.php?fid=16571&uid=7681&d=1306256468
      I'm trying to narrow this attachment error down, without disabling the program.
    Issue Details
    Issue Number 2325
    Issue Type Bug
    Project VaultWiki 3.x Series
    Category Attachments
    Status Fixed
    Priority 2 - Fatal / Database Errors
    Affected Version 3.0.11
    Fixed Version 3.0.12
    Milestone (none)
    Software DependencyAny
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. June 8, 2011 1:35 AM
      pegasus pegasus is offline
      VaultWiki Team
      Fixed for the next build. This occurs when creating or modifying any existing attachment, the Image namespace exists, and the current user doesn't have permission to view the Image namespace.

      In AdminCP > Plugins & Products > Plugin Manager, find the plugin at hook location "attachdata_start". Edit, and replace all PHP code with the following:
      Code:
      if (THIS_SCRIPT == 'newattachment' AND IMAGE_SPACE AND $_POST['ajax'] AND !empty($registry->GPC['filedata']))
      {
      	global $vault;
      
      	if (!$vault->misc['attachuser'])
      	{
      		global $attachlib;
      
      		$vault->unserialize('vault_namespaces');
      		$vault->misc['attachuser'] = $attachlib->userinfo['userid'];
      
      		require_once(DIR . '/vault/class/pager.php');
      		$special = new vB_WikiPager($registry);
      		$special->filter_namespace_by_permission($registry->options['vault_namespaces'][IMAGE_SPACE]['forumid']);
      
      		if ($vault->misc['filtered_childlist'] AND $postuserid = $registry->db->query_first("
      			SELECT acu.userid
      			FROM " . TABLE_PREFIX . "filedata AS fd
      			INNER JOIN " . TABLE_PREFIX . "attachment AS acu ON (acu.filedataid = fd.filedataid)
      			LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON (thread.firstpostid = acu.contentid AND thread.title LIKE acu.filename)
      			WHERE acu.filedataid IN (" . implode(',', $registry->GPC['filedata']) . ")
      				AND thread.forumid IN (" . implode(',', $vault->misc['filtered_childlist']) . ")
      			LIMIT 1
      		"))
      		{
      			global $vbulletin;
      
      			// these aren't references of each other
      			$attachlib->userinfo['userid'] = $postuserid['userid'];
      			$vbulletin->userinfo['userid'] = $postuserid['userid'];
      		}
      	}
      }
      Reply Reply  
    2. June 9, 2011 4:13 PM
      TundraSoul TundraSoul is offline
      New Member
      Tried that, but the errors continue.

      Code:
      Database error in vBulletin 4.1.3:
      
      Invalid SQL:
      
                             SELECT fd.filedataid
                             FROM attachment AS acu
                             INNER JOIN filedata AS fd ON (acu.filedataid = fd.filedataid)
                             LEFT JOIN thread AS thread ON (thread.firstpostid = acu.contentid AND thread.title LIKE acu.filename)
                             WHERE acu.filedataid = 8955
                                     AND acu.userid = 6879
                                     AND thread.forumid IN ()
                             LIMIT 1;
      
      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 ')
                             LIMIT 1' at line 7
      Error Number  : 1064
      Request Date  : Thursday, June 9th 2011 @ 10:42:41 AM
      Error Date    : Thursday, June 9th 2011 @ 10:42:41 AM
      Script        : http://www.mysite.com/asset.php?fid=8955&uid=6879&d=1306253703
      Referrer      : http://www.mysite.com/member-6879-electrosphere11/
      Reply Reply  
    3. June 9, 2011 5:42 PM
      TundraSoul TundraSoul is offline
      New Member
      Additionally I see vB 4.1.4 is out today.
      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 7:08 PM.
    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.