XF 2.1 vBulletin Import Redirect issue

PaulaG

Member
The switch from VB4 to XF 2.1 went very smooth. I'm having one issue with embedded links in imported posts that are not being caught and redirected. Instead it is passing the URL on to the old VB forum. The format of the embedded URLs does not appear to match the pattern expected:

This is the format of the embedded link, where the thread ID is 55247:
Code:
https://www.xxxxxxxx.org/vb/showthread.php?55247-This-is-a-link-to-a-VB-post

The Import redirector seems to want a different format and changes it to this:
Code:
https://www.xxxxxxxx.org/forum/thread/This-is-a-link-to-a-VB-post.55247

If I manually change the url to this it works:

Code:
https://www.xxxxxxxx.org/forum/threads/This-is-a-link-to-a-VB-post.55247

The only difference is "/thread/" vs "/threads/"

The .htaccess rewrite seems to be directing it correctly.

XF301VB/MVC/router.php seems not to handle this particular syntax quite right.
 
Last edited:
I've put logging in XF301VB/MVC/router.php and it is never being reached when the URL contains the old /vb path.

Also, I found what look like a few errors in this module that even if it did get here, it wouldn't catch or redirect it to /forum/threads due to an incorrect $action_map for "showthread" -> "thread" (should map to "threads").

The regex in function getNonRewriteMatch( ) is missing an escape \ in 2 places where looking for a path delimiter '/'
Code:
		//$regexMatch = '#' . $action . '\.php(?:/|\?(?:do=\w+&)?)(?:(?P<id_name>[a-z]|[a-z]+id)=)?(?P<content_id>\d+)(?:-[a-z0-9-]+)?(?:(?:/|&)page=?(?P<page>\d+))?#i';

		  $regexMatch = '#' . $action . '\.php(?:\/|\?(?:do=\w+&)?)(?:(?P<id_name>[a-z]|[a-z]+id)=)?(?P<content_id>\d+)(?:-[a-z0-9-]+)?(?:(?:\/|&)page=?(?P<page>\d+))?#i';

However, I'm still not understanding how the redirection is supposed to work. I have the new XF forum in a different path from the root (VB4 is in /vb, XF is in/forum). I've placed the .htaccess and index.php from the XF301VB addon into /vb (with appropriate path modifications) , but any URL arriving for /vb that doesn't have index.php still gets sent to the old VB4 forum.

As a temporary hack I've had to go into the various VB php modules and add the same code as I did to index.php to at least get them steered to the XF site though these all result in an Opps message. But at least they aren't getting the old VB site with the "Down for maintenance" message.

If someone has a bookmark to one of the old VB URLs that doesn't contain index.html, this URL isn't being sent to router.php for redirection.

I'm on an Appache2 server. The Importer has been enabled in the Control Panel with the correct import table (which is populated).
 
It took me quite a bit of hacking to make it work. There are multiple issues and to get around them I had to make changes to .htaccess, router.php, plus modify the original vb/showthread.php to hand off this URL request to vb/index.php (which then runs XF301VB\Pub\App). It's not pretty, and I'm hacking what is now a production system but since it's finally working I'm not going to touch it.

Hopefully we'll see an update soon that fixes this properly.
 
Back
Top Bottom