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.
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'];
}
}
}
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/
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.