Enabling the forum sideblock halts the whole site with the following database error:
Any ideas?
Using the most recent release and if it makes any difference, I imported thanks from the vBSEO system.
Cheers,
Regs.
Code:
Invalid SQL:
SELECT
entry.*,
user.*
,avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline,customavatar.width AS avwidth,customavatar.height AS avheight
FROM (
(
SELECT
post.postid,
post.title AS posttitle,
thread.title AS threadtitle,
thread.title AS title,
thread.threadid,
thread.forumid,
entry_post.*
FROM (SELECT * FROM dbtech_thanks_entry WHERE varname IN('likes') AND contenttype = 'post' ORDER BY entryid DESC LIMIT 10) AS entry_post
LEFT JOIN post AS post ON (post.postid = entry_post.contentid)
LEFT JOIN thread AS thread ON (thread.threadid = post.threadid)
) UNION ALL (
SELECT
blog_text.blogtextid AS postid,
blog_text.title AS posttitle,
blog.title AS threadtitle,
blog_text.userid,
blog.firstblogtextid AS threadid,
0 AS forumid,
entry_blog.*
FROM (SELECT * FROM dbtech_thanks_entry WHERE varname IN('likes') AND contenttype = 'blog' ORDER BY entryid DESC LIMIT 10) AS entry_blog
LEFT JOIN blog_text AS blog_text ON (blog_text.blogtextid = entry_blog.contentid)
LEFT JOIN blog AS blog ON (blog.blogid = blog_text.blogid)
) UNION ALL (
SELECT
groupmessage.gmid AS postid,
groupmessage.title AS posttitle,
firstgroupmessage.title AS threadtitle,
groupmessage.postuserid AS userid,
groupmessage.discussionid AS threadid,
0 AS forumid,
entry_socialgroup.*
FROM (SELECT * FROM dbtech_thanks_entry WHERE varname IN('likes') AND contenttype = 'socialgroup' ORDER BY entryid DESC LIMIT 10) AS entry_socialgroup
LEFT JOIN groupmessage AS groupmessage ON (groupmessage.gmid = entry_socialgroup.contentid)
LEFT JOIN discussion AS discussion ON (discussion.discussionid = groupmessage.discussionid)
LEFT JOIN groupmessage AS firstgroupmessage ON (firstgroupmessage.gmid = discussion.firstpostid)
) UNION ALL (
SELECT
usernote.usernoteid AS postid,
usernote.title AS posttitle,
'N/A' AS threadtitle,
usernote.posterid AS userid,
usernote.userid AS threadid,
0 AS forumid,
entry_usernote.*
FROM (SELECT * FROM dbtech_thanks_entry WHERE varname IN('likes') AND contenttype = 'usernote' ORDER BY entryid DESC LIMIT 10) AS entry_usernote
LEFT JOIN usernote AS usernote ON (usernote.usernoteid = entry_usernote.contentid)
) UNION ALL (
SELECT
visitormessage.vmid AS postid,
visitormessage.title AS posttitle,
'N/A' AS threadtitle,
visitormessage.postuserid AS userid,
visitormessage.userid AS threadid,
0 AS forumid,
entry_visitormessage.*
FROM (SELECT * FROM dbtech_thanks_entry WHERE varname IN('likes') AND contenttype = 'visitormessage' ORDER BY entryid DESC LIMIT 10) AS entry_visitormessage
LEFT JOIN visitormessage AS visitormessage ON (visitormessage.vmid = entry_visitormessage.contentid)
)
) AS entry
LEFT JOIN user AS user USING(userid)
LEFT JOIN avatar AS avatar ON(avatar.avatarid = user.avatarid) LEFT JOIN customavatar AS customavatar ON(customavatar.userid = user.userid)
WHERE 1=1
AND userid NOT IN (2379,1872,6676,6685);
MySQL Error : Column 'userid' in where clause is ambiguous
Error Number : 1052
Any ideas?
Using the most recent release and if it makes any difference, I imported thanks from the vBSEO system.
Cheers,
Regs.