Not sure where to start....

Users are redirected to a blank page upon, logging directly into the forums (Vbulletion). Otherwise I believe everythign is working..

Users can log into Drupal, and the session is opened/transfered to VB along with user accounts.
Users can logout in VB and it closes the session in Drupal and the forums.

I have subscribed to this thread and will be monitoring my email over the next few days, should anyone be able to help with some testing....

Feel free to make a account on the site to aid with testing and so that you can see what it is doing...

www.agsn.ca

Thanks!

Comments

binary basketball’s picture

I've got this issue as well and I'm going to be spending the day trying to figure out the issue. Hopefully I can get it figured out pretty soon. I'd rather not wait around until the maintainer is able to dedicate some time to the issue. Though, ideally I'd be able to :-)

If I'm able to figure this out I'll post an update, else, here's my subscribe post.

binary basketball’s picture

After looking around a bit, I figured I needed to alter the value names for name and password in the vBulletin login block since vBulletin is different from the Drupal login. Here are my changed values.

This one should already be changed
<form action="/drupalvb/login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, $show[nopasswordempty])">

I changed these two to match the correct expected naming structure of the default Drupal login
<td><input type="text" class="bginput" style="font-size: 11px" name="name" id="navbar_username" size="10" accesskey="u" tabindex="101" value="$vbphrase[username]" onfocus="if (this.value == '$vbphrase[username]') this.value = '';" /></td>
and
<td><input type="password" class="bginput" style="font-size: 11px" name="pass" id="navbar_password" size="10" tabindex="102" /></td>

This seems to fix the first issue because instead of just getting a blank screen we actually get an error.

Fatal error: Call to undefined function user_login_validate() in [snip]/sites/all/modules/drupalvb/drupalvb.module on line 491

After looking at the modules code it looks like drupalvb_login() gets called, and ($_REQUEST['name']) is found but not ($user->uid) so it skips to else where we find our friendly user_login_validate() function being called. I couldn't find the function in the drupalvb module and I couldn't find it in the core user module either. Right now I'm mucking around with the code to find a function to replace that with and log in correctly but I'm not having any luck so far. I've tried using

user_login_authenticate_validate($_REQUEST['form_id'], $_REQUEST);
user_login_default_validators($_REQUEST['form_id'], $_REQUEST);
drupalvb_login_validate($_REQUEST['form_id'], $_REQUEST);
user_login($_REQUEST['form_id'], $_REQUEST);

But every time I'll get redirected to Drupal home and I don't get logged in to either Drupal or vBulletin. At least we are heading in the right direction (I think). Hopefully somebody else out there has some suggestions or input on how to get the user validated... I don't know anybody could benefit from testing it out or seeing it in action or whatever, but you can check it out on my basketball forum and hopefully we can get this fixed soon. One of my members reported not being able to log in for 2 days and others have figured out a way to bypass Drupal authentication altogether by hitting reply to a post and using that login (which still calls login.php?do=login).

binary basketball’s picture

I couldn't figure out which function to use so instead of doing all that, I copied the main login html and it seems to work just fine. When you copy it over though the style gets messed up because vBulletin uses tables inside the login script. This is what it looks like when adapted to vBulletin.

		<!-- login form -->
				<form action="/" accept-charset="UTF-8" method="post" id="user-login-form">
<div>

<script type="text/javascript" src="clientscript/vbulletin_md5.js?v=$vboptions[simpleversion]"></script>
		<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
		<tr>
			<td class="smallfont" style="white-space: nowrap;"><label for="edit-name">$vbphrase[username]</label></td>
 <td><input type="text" maxlength="60" name="name" id="edit-name" size="10" value="" class="form-text required" /></td>
</tr>
		<tr>
<td class="smallfont"><label for="edit-pass">$vbphrase[password]</label></td>
 <td><input type="password" name="pass" id="edit-pass"  maxlength="60"  size="10"  class="form-text required" /></td>
<td><input type="submit" name="op" id="edit-submit" value="Log in"  class="form-submit" /></td>
<input type="hidden" name="form_build_id" id="form-afc5d235be3c133c2f72a8b1d05f92e6" value="form-afc5d235be3c133c2f72a8b1d05f92e6"  /></td>
		</tr>
		</table>
<input type="hidden" name="form_id" id="edit-user-login-block" value="user_login_block"  />
</form>

		<!-- / login form -->

I believe form action="/" actually redirects but the previous value was for the page I set up to be the front page of Drupal in my site information settings page but obviously that's going to be different for everybody and if you ever change that setting it won't reflect on your vBulletin form.

So, everything is working now, if not the ideal way. Hopefully Sun can go over everything and update the code in the module soon so it works more smoothly for everybody else.

Also, I have a feeling the values for the form id and value are going to be different for everybody else so you might want to go over that and adjust accordingly

tingles’s picture

Was tied up with some family things yesterday... Checking into this tonight and going over some of the above responses...

Will update after reviewing..

binary basketball’s picture

Title: Blank Screen after Logging in directly on VBulletion » Blank Screen after Logging in directly on vBulletin

It's been a few days now so I figured I'd provide a status update as to how this "fix" has been working for me.

So far, there have been many users login successfully and none of the new users have mentioned any issues. I've had current members complain multiple times and I'd either receive an email or an IM or some sort of plea to help them out. Most of the time I tell them to delete all their cookies, close their browser completely and then log in using their vBulletin account name and password at the main Drupal site (to avoid any issues with whatever fix I provided). 80-90% of those end up logging in saying something to the effect of they figured it out but I haven't been able to get any real information.

My guess is they are having cookie and/or password issues. (Some of them had accounts on both previously)

Though, there is still that 10% or so which is still too big of a number for me. It'd be nice if we could figure out a way to make this as simple and easy as possible for the users (which is what attracted me to this module to begin with).

I'd like to provide whatever help I can to get this issue fixed and working for all my members. I'm kind of passed the point of no return here...

If there is anything at all I can do to help fix, debug, etc... please let me know...

Branndon’s picture

Thanks for the updates, how's it working now? The same?

binary basketball’s picture

I haven't been able to work on this for the past couple of weeks but tonight, I picked up a bottle of a tasty beverage to battle it out with pure will and determination in an epic battle to see who gives up first, this dirty bug or me.

I'll keep you updated.

Adam S’s picture

Oh, you wan to redirect back to the vBulletin page? That's easy.

Replace:

<form action="/" accept-charset="UTF-8" method="post" id="user-login-form">

with

<form action="/node?destination=[put the url of vBulletin in here (without the brackets) also I think that if the vbulletin is in a sub-directory of the root you put just /vbulletin]"  accept-charset="UTF-8" method="post" id="user-login-form">
catme’s picture

Anyone got the solution I have this error too.

sun’s picture

Status: Active » Closed (duplicate)

I fear we have some mysterious user login/logout problems here, which I cannot replicate at all.

So thanks for taking the time to report this issue. However, since it deals with both login and logout problems, marking as duplicate of #545702: Error when using drupalvb/logout?.
You can follow up on that issue to track its status instead. If any information from this issue is missing in the other issue, please make sure you provide it over there.