vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Project Tools (https://vborg.vbsupport.ru/forumdisplay.php?f=266)
-   -   Causes Database Error with vB 4.1.1 and aMember (https://vborg.vbsupport.ru/showthread.php?t=258737)

crazyace 02-12-2011 02:31 AM

Causes Database Error with vB 4.1.1 and aMember
 
We use aMember to handle all of our subs. After updating to 4.1.1 we started to have database issues for new users trying to log into the forums.

Code:

Database error in vBulletin 4.1.1:

Invalid SQL:

SELECT forum.forumid, forum.lastpost, forum.lastposter, forum.lastposterid, forum.lastthread, forum.lastthreadid, forum.lasticonid, forum.threadcount, forum.replycount, forum.lastpostid, forum.lastprefixid, user.usergroupid, user.homepage, user.options AS useroptions, IF(userlist.friend = 'yes', 1, 0) AS isfriend

FROM forum AS forum

LEFT JOIN user AS user ON (user.userid = forum.lastposterid)
LEFT JOIN userlist AS userlist ON (userlist.relationid = user.userid AND userlist.type = 'buddy' AND userlist.userid = );

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 6
Error Number : 1064
Request Date : Friday, February 11th 2011 @ 10:10:43 PM
Error Date : Friday, February 11th 2011 @ 10:10:43 PM
Script : http://www.probotters.com/forum/index.php
Referrer : http://www.probotters.com/forum/login.php?do=login
IP Address : 173.89.12.6
Username : dtestd
Classname : vB_Database
MySQL Version :
-->

As you can see the issue is with this part of the code
Code:

AND userlist.userid = );
where the = is empty. After disabling Project Tools it worked like a charm again. So any ideas on how to solve this issue would be wonderful.

PitchouneN64ngc 02-12-2011 06:44 PM

The strange thing with this query is why vB devs are using $vbulletin->userinfo['userid'] and $userid which is the same value?

I'm trying to see where it happens but can't reproduce.

Can you try this:

- Activate Project Tools product
- Uncheck every plugin related to Project Tools
- Enable 1 plugin at each time and to go page to the problematic page to see if the problem occurs
- When the first issue appears, give me the name of the latest plugin you activated

Thanks :)

PS: seems to be similar than http://www.vb-os.com/project.php?issueid=163

--------------- Added [DATE]1297547374[/DATE] at [TIME]1297547374[/TIME] ---------------

I posted a patch in my latest link, can you try it?

As I can't reproduce the problem but it seems the origin is the same... Thank you :)

crazyace 02-15-2011 02:07 PM

I'll try the patch and see what happens. I had disabled all of my plugings and when I enabled only Project tools, any members created via aMember would not log in. So I'll test and report back :)


All times are GMT. The time now is 06:59 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01070 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete