Port Drupal vB to 6.x

dotslasher - March 6, 2008 - 11:15
Project:Drupal vB
Version:HEAD
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:postponed
Description

Will there ever be a version for the newest drupal 6.x release?
Thanks

#1

rszrama - March 6, 2008 - 15:04

It's not something I'll be doing, particularly b/c I'm not using the module in any capacity... so I really can't test anything that's done anyways. I'll mark this as unmaintained, and leave the opening for an interested observer. ; )

#2

sun - April 19, 2008 - 01:52
Version:5.x-1.1» HEAD
Status:active» postponed

#3

sun - May 6, 2008 - 20:26
Title:6.x support» Port Drupal vB to 6.x

Better title.

#4

sun - May 9, 2008 - 23:26
Status:postponed» active

Now that 2.0 is considered stable, a port to 6.x is worth considering. Patches are welcome.

#5

TheresaM - May 30, 2008 - 13:17

just subscribing

#6

coltrane - June 13, 2008 - 20:45
Status:active» patch (code needs work)

Here's a first pass patch using coder module against HEAD of Drupal vB. CNW because I didn't alter the authentication changes, queries against vBulletin use the deprecated db_num_rows(), and there are some errors after installation.

#7

coltrane - June 13, 2008 - 20:46

Attachment didn't stick, let's try it again ...

AttachmentSize
drupalvb-port-6-230678.patch15.27 KB

#8

sun - June 13, 2008 - 21:13

Looks pretty good as kick-off patch! Just set the status to PNR/RTBC if you think this is ready, since I doubt that there will be many testers for D6. However, be sure to watch the issue queue as I will probably commit a major improvement soon (a rather tiny but effective change), which then needs to be merged into this one.

#9

coltrane - June 13, 2008 - 21:41

Will do, thanks. I should note that I don't currently have a vBulletin install I can test against, which is why the patch is extra light :)

#10

CompShack - June 13, 2008 - 22:13

I will be updating my current drupal site to D6 and thinking about integrating VB 3.7 instead of my current drupal core forum. Would this module work on VB 3.7 after porting to D6?

Thanks!

#11

sun - June 13, 2008 - 22:27

I (privately) received at least one positive feedback that it's working with vB 3.7, too. However, that's a different topic and should not be discussed further in this issue.

#12

sun - June 14, 2008 - 01:30

@coltrane: No problem, I can test your patches. So just let me know if you think your patch is ready for testing.

#13

CompShack - June 15, 2008 - 03:13

I'm ready to test as well. I have a test D6 and a test 3.7 ready to go.

#14

CompShack - June 19, 2008 - 05:48

I applied the provided path in post #7 to 5.2 and tried to install and test. I'm in the process of learning how to code in PHP and drupal so this is an FYI that I'm working on porting the module.

I was able to fix the db_num_rows() related problems and fixed couple more issues related to the l() function that was causing the whole site to crash!

This is what I have so far. I was able to install the module, connect to VB 3.7.1 and import users to VB as well :) - Things are looking good but there are more things to fix and test.

I never made a patch before (as i said, my first time coding). So, I will post my patch as soon as I know how to do one. I know it is easy, but it is getting late now and can't keep my eyes open!

#15

sun - June 19, 2008 - 04:54

@CompShack: Ugh. If this is really your first time coding, you've chosen a rather complex module for your start. If you really want to contribute your changes, then you definitely should read at least the following sections of d.o's handbooks:
http://drupal.org/coding-standards
http://drupal.org/writing-secure-code
http://drupal.org/patch

#16

CompShack - June 20, 2008 - 02:45

If this is really your first time coding, you've chosen a rather complex module for your start

Love the challenge!!

Attached is my patches - you should apply them after you apply patch in #7.

sun, do you think you can start a dev6 for the module? With patch #7 and my 2 patches. users will be able to install the module and export users to vB (testing on 3.7.1).

I noticed that if users registered through vBulletin and tried to login to the drupal site then they WONT be able to do that. Do you know where to start to get this fixed?

AttachmentSize
drupalvb.inc.php-d6-061908.patch955 bytes
drupalvb.module-d6-061908.patch1.91 KB

#17

smk-ka - June 20, 2008 - 07:53
Status:patch (code needs work)» patch (code needs review)

@CompShack
Please post a complete patch, not incremental ones (they make it hard to review).

I noticed that if users registered through vBulletin and tried to login to the drupal site then they WONT be able to do that.

I've recently added that feature to the current 5.x-2.0 release, will post a patch soon. Let's focus on the D6 port in this issue.

@sun
Can you give me CVS access?

#18

CompShack - June 20, 2008 - 12:02

@smk-ka

I've recently added that feature to the current 5.x-2.0 release, will post a patch soon. Let's focus on the D6 port in this issue.

This issue is with D6. It works fine with D5.

Please post a complete patch, not incremental ones (they make it hard to review).

Sorry, I wish I know how. I know how to create a patch on file at a time. Would you point me to an example to create a patch for more than one file in one shot?

Thanks!

#19

coltrane - June 26, 2008 - 17:35

CompShack,

A good resource is http://drupal.org/patch/create. If you're working from CVS, which I recommend, then the command is cvs diff -uRp directory > filename.patch where directory could just be . (current directory).

#20

jcfiala - July 2, 2008 - 21:32

I've made a further patch - the code as given still uses hook_auth and hook_info - these hooks no longer work in Drupal 6. Instead, the code is supposed to use hook_form_alter on the login form. The enclosed code probably works, but has not been tested as I don't (yet) have a vb setup to test against.

AttachmentSize
drupalvb-port-6-form-alter.patch3.27 KB

#21

CompShack - July 2, 2008 - 21:33

@jcfiala Thanks for taking a stab at this. I will try to run few tests when I get home tonight. I have been testing this module after applying patches from #7 and #16 and things look good.

I'm going to apply your patch against my D6 version which is a D5 version with patch #7 and #16 applied to it. Is this what you are expecting?

#22

jcfiala - July 2, 2008 - 21:33

Yes. I may take a few moments and try doing a grand unified patch.

#23

jcfiala - July 2, 2008 - 21:44

And here's a try at a grand unified patch - did this off of a checkout of DRUPAL-5--2.

AttachmentSize
drupalvb_total_d6_20080702.patch22.22 KB

#24

CompShack - July 2, 2008 - 23:52

@jcfiala - well, applied the patch and when tried to log in to Drupal i got the following error.
Fatal error: Call to undefined function drupalvb_db_is_valid() in C:\wamp\www\drupal-5.7\sites\all\modules\drupalvb\drupalvb.module on line 117

I see the function in drupalvb.inc file but how come it is saying it is "undefined". Can you help fixing this? I'm still new to PHP and drupal :(

#25

jcfiala - July 3, 2008 - 14:25

Sure. The problem here is that the patch is untried - I don't currently have a vb board to test against, so I haven't actually tried to use the module yet - I just made changes that looked right. As such, I'd completely forgotten to use require_once to include the drupalvb.inc file.

See, PHP only knows about the files you tell it about, unless you use an autoloader, which basically includes files based on rules you set up. Drupal only loads the .module files in a module, so anything else needs to be included by hand. (Except for the new hook_menu, where you can tell it to include something when a given path is used.) So, I've added in the require_once line that should work, and I include the grand unified patch here:

Once I've got a vb board to test this code against, I expect to present better fixes.

AttachmentSize
drupalvb_total_d6_20080703.patch22.32 KB

#26

CompShack - July 3, 2008 - 15:29

Yep, I understand - I'm actually a developer in real life but not in PHP so didn't know how to "tell" php where the function is. Will try to test this weekend and report back. Thanks for your help porting this module!

#27

CompShack - July 3, 2008 - 23:25

Ok, the latest patch fixes the fatal error, but a user registered through VB is still not able to login to drupal. it still give the following "Sorry, unrecognized username or password. Have you forgotten your password?"

I've looked at your code but couldn't pin point the reason for the bug :(

#28

sun - July 3, 2008 - 23:55
Status:patch (code needs review)» patch (code needs work)

This patch is unnecessary large. For example, as you can see in the diff, it's created against CVS, but from CHANGELOG.txt,v 1.7.4.24 instead of the current revision:

-// $Id: CHANGELOG.txt,v 1.7.4.25 2008/06/19 04:39:39 sun Exp $
+// $Id: CHANGELOG.txt,v 1.7.4.24 2008/05/08 10:03:40 sun Exp $

Needs to be re-rolled, aka. 'chasing head'.

#29

CompShack - July 5, 2008 - 01:19

Hi all,
I have done quite some testing and here are the 1 left bugs:

1- The variable's page is just a mess. Look at the screen print below to see what I mean.

I'm not sure what the variable page is there for. The module worked with no flaws but for the above mentioned two.

sun, or jcfiala - can you guys take a stab at the issue?

sun, do you think we can have a d6 dev available now? This should make testing easier for lots of new comers who are interested in DrupaVB.

Thanks!

AttachmentSize
variables-page.png24.46 KB

#30

sun - July 5, 2008 - 01:09

I won't have time to work on this port in the next one or two weeks. However, I will commit major improvements for Drupal vB 5.x-2.x in the next days. Because of that, this patch will need a major re-roll then. Other than that, this patch does not seem to implement an authentication provider currently and the code needs plenty of clean-up - for example, obsolete functions should not be commented out but rather completely removed.

#31

CompShack - July 5, 2008 - 01:28

@sun, sorry I have edited my last post. I re-tested creating a user in vb and then login to Drupal and now it works. I was actually missing one step and that is to include the config.php file in the module directory. Once i did that users registered in vb are able to login to Drupal.

However, I will commit major improvements for Drupal vB 5.x-2.x in the next days.

Sounds like great news :) - any chance you can expand on what kind of improvements?

Because of that, this patch will need a major re-roll then. Other than that, this patch does not seem to implement an authentication provider currently and the code needs plenty of clean-up - for example, obsolete functions should not be commented out but rather completely removed.

I will start working on that once the new D5 is out. I would love to migrate away from Drupal forums and Drupal VB is my best way out :)

Thanks again sun!

#32

sun - July 5, 2008 - 01:42

Well, a bunch of improvements. Since 5.x-2.x is quite young and fresh, and has not been tested in a production environment yet, we've got a vastly overhauled module in the meantime - especially regarding integration of both systems.

#33

bejam - July 7, 2008 - 13:42

This sounds very promising, Subscribing!

#34

Brook - July 17, 2008 - 17:45

I am interested in this for Drupal 6 and vB 3.7.2 too. I am not a coder but am willing to test if required.

Is it ok to ask questions here? I wanted to know if it is possible to have my vb install in a subdomain (vb.mysite.com) and the main drupal site in the main doman (mysite.com)? Cheers and thanks for the hard work!

Also, is there a donation scheme where you can donate to projects like this?

#35

sun - July 18, 2008 - 15:36

@Brook:

1) Testers are always welcome.
2) Yes, that's possible, but you will need an advanced configuration for the cookie domain in Drupal and vBulletin.
3) Unfortunately, no. However, I've set up a ChipIn for Drupal vB 6.x port now.

#36

jcfiala - July 18, 2008 - 22:33

Alright! As promised, I finally got a copy of vbbulletin, and I've been working with it. As such, new patch!

This is rolled off of the same version off of cvs as my other ones, as I'm really not that familiar with cvs, and just left things where they'd been.

AttachmentSize
drupalvb_total_d6_20080818.patch20.54 KB

#37

sun - July 18, 2008 - 22:50

@jcfiala: As already mentioned in #30, major improvements have been committed to CVS in the meantime (which led to 5.x-2.1). Is your last patch based on 5.x-2.1? (I'm unable to grasp, because your patch does not follow Drupal's patch standards - see http://drupal.org/patch/create)

#38

jcfiala - July 21, 2008 - 14:21

@sun: No, I've been making changes to the same version, overlaying with the copy I'd checked out of cvs before, and using cvs to make a patch. I'm really not very comfortable using CVS, and so I'm not entirely surprised if I"m not quite doing it right.

I'll have to take a look at 5x.-2.1 and compare it with what I'm working on to see what changes may need to be made.

#39

CompShack - July 21, 2008 - 18:17

@jcfiala - thanks for your help on getting this ported to D6. It would be great if you can look at 5x.-2.1 and release a new patch. I will be unavailable for about 3 weeks but will fully test the patch if you have one by the time I'm back. Thanks again!

#40

jcfiala - July 21, 2008 - 20:10

I'm going to hopefully roll out a patch for 5.x-2.1 to 6 by eod - I've got a patch roughly converted, but it naturally could use some testing.

Happily, I've got the vb bulletin board up to full working order in my environment, so we're doing well on testing.

#41

jcfiala - July 21, 2008 - 22:09

Okay, diff is from the DRUPAL-5--2-1 label. It uses the command referenced in sun's post at #37 - "cvs diff -uRp . > drupalvb_total_v6_20080721.patch"

If there's still a problem with this patch procedurally, someone's got to come to Boulder to give me a hand with it. :)

That said, this seems to work just fine. I've got cross account creation, cookies, blocks.... all good.

AttachmentSize
drupalvb_total_v6_20080721.patch26.74 KB

#42

CompShack - July 25, 2008 - 06:06

@jcfiala - I got a clean install after applying your patch to 5.2.1 :) - I was also able to export all users from Drupal to VB.
I didn't do a full test yet but i've noticed that the New private messages count link in the "forum info" block will not display the number of new PMs if there is any for that user. BUT if you click on the link it will show you the new messages. I guess the counter has a bug of some sort, can you test this and report back?

#43

sun - July 26, 2008 - 19:19
Status:patch (code needs work)» postponed

Sorry guys... we have identified major bugs with 5.x-2.x on a large-scale production site, which a) are partially (but not completely) resolved, b) lead to major changes in the module, c) are not yet committed, and d) will be hard to merge into a new branch.

Those bugs are primarily related to user authentication (SSO) in Drupal and vBulletin.

I know this is a pain as you have been working on this quite some time now. However, I think that it really does not make sense to port a module that will undergo major changes, which would have to be merged into the new version afterwards.

Marking as postponed for now. That does not mean this is really postponed. I just have no idea currently, when all of those bugs will be resolved finally. I will change the status back when the show can go on. 8)

#44

coltrane - July 26, 2008 - 21:44

@sun, do you think it'd be possible to make issues in the queue for many of the bugs identified?

#45

dot45 - August 15, 2008 - 05:06

subscribing

#46

sun - August 15, 2008 - 14:55

I am receiving more and more mails privately about this port. As mentioned in #43, 5.x still contains some bugs that need to be fixed before a port to D6 can happen. The bugs are already fixed, but I cannot predict when time will permit to create issues for all identified bugs, turn all changes in atomic patches, and commit all the changes to the project.

After that happens, the port to D6 must be redone from scratch, because major parts of the module have been altered.

All of this is not a simple task - let alone hunting down, debugging, fixing, and testing those bugs. Additionally, because external user authentication has changed in D6, we need to port the very intelligent solution in DrupalvB to the new mechanism.
I'm sorry that no one is able to co-work with us on the remaining tasks for D5, which is the cause for the delay and postponing this port. However, that's the situation and we cannot really change it.

If you want to see this happen faster, then you should consider to ChipIn for Drupal vB 6.x port.

#47

dot45 - August 16, 2008 - 00:40

thanks for putting a value for the port on the chip-in.
I am ready to donate for it, but one question (as this is my first time doing a chip-in), if the total is not met will you refund those that did donate? Please dont take offense, as i'm a newb ;)

#48

sun - August 16, 2008 - 18:20

Usually, a ChipIn is seen as just a tool to increase the pace for doing something. The more people chip in and the higher the total value is, the sooner can the work be done. Since these bugfixes and this port will happen sooner or later anyway, it's really just a way to increase the development speed by allowing some dedicated time to work on all the tasks. So if the required total will not be met, then it hopefully will be enough to finish some tasks sooner. Hence, refunding will only happen if folks donate, but nothing happens at all, which is very unlikely.

#49

jesepi - August 19, 2008 - 08:02

I'd suggest giving a link to that donation site directly on the http://drupal.org/project/drupalvb page if that is allowed.

#50

thompson - August 22, 2008 - 19:56

is there a test version of drupal 6 and vbulletin 3.7.2 drupal vb ?

i ´m very interessted in this.

#51

CompShack - August 22, 2008 - 23:09

Well the port you see attached above works for D6 and vb 3.7.2, I have tested it. BUT according to sun, some major bugs have been found on a large production site with the vb D5 version and the work to port the module to D6 will not start until all bugs are resolved. So, we are still waiting :(

#52

thompson - August 24, 2008 - 10:05

shit ... it will be "the modul" i mostly need. waiting still too.

#53

alpinejag - August 25, 2008 - 19:20

subscribing

#54

GravitySpec - August 26, 2008 - 21:31

subscribing as well, been looking at upgrading my site to Drupal 6 and this is one module that is crucial. I wish I had the time to help in development but I still need to familiarize myself with making modules in general.

#55

thompson - August 30, 2008 - 15:34

any news ? which file (no patch file) can i test for d 6 ?

#56

CompShack - August 30, 2008 - 18:58

We are waiting on sun to get back to us with bug fixes for D5 so we can start porting to D6. And we are still waiting waiting waiting waiting - it feels like forever ;)

#57

thompson - September 6, 2008 - 18:21

is sun working on it ?

please give us a sign.

 
 

Drupal is a registered trademark of Dries Buytaert.