Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Data importer - vbulletin import forum_id issue
Avatar
Chris Smith
Member
Free Members
sp_UserOfflineSmall Offline
Aug 16, 2012 - 10:55 am

I seem to have a problem with importing a vbulletin forum using the data importer. When i do the import the post_id, topic_id, and user_id all seem to transfer correctly. However the forum_id does not seem to import correctly. Instead of referencing an id in the forums table it references the id of the first post in the topic. If it is the first post of a topic then the forum_id=0. The interesting thing is the forum's basic functionality does not seem to be effected. As I can go into each forum and topic and find the correct topic and posts. The one thing that I have noticed it does affect is the search functionality. If I search for a unique word that is in 931 posts in my forum (searched using an sql query in the post_content) I only get 5 matches. Is there anything that can be done to resolve this issue? Thanks in advance.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 16, 2012 - 12:34 pm

Not making excuses but the vBulletin script was the only one we didn't write not have had an opportunity to test. It was contributed by a user. But that would have no effect on searching.

The only thing that comes to mind is that perhaps the FULLTEXT index on the posts table needs t be rebuilt. I have seen this happen before, especially if the table starts to go into overflow. Try running an optimise on he table and see of that rebuilds it.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Chris Smith
Member
Free Members
sp_UserOfflineSmall Offline
Aug 17, 2012 - 10:04 am

So I tried to run an optimize on the table and it didn't rebuild it, but I decided to take a look at the vbulletin import script to see if I could figure out the problem with the forum_id. I made a change on line 125

from:

$map['sfposts']->forum_id        = 'parentid';

to:

$map['sfposts']->forum_id        = '#query:SELECT forumid FROM <%dbname%>.<%dbuserpfix%>thread WHERE threadid = <%topic_id%>';

With the former command the forum_id was being imported as the id of the first post in a topic. I then did an import to test it. The import took much longer but it correctly imported the forum_ids and it also fixed my search problem. I am guessing (this is pure conjecture at this point) that the problem with search was that when it tried to build a link it wasn't capable of finding which forum the post was in so it couldn't create a permalink and subsequently didn't output the result. Anyways it seems to work with the change made above, so I think that would be a good fix for the future.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 17, 2012 - 10:55 am

Sounds like to might be spot on regarding the search issue. And a good catch on the importer.

As I say - I have no vBulletin database with which to test but I can understand what you have done and it sounds like it is probably a good move. I will open a ticket to get this fix in place.

And thanks very much for the troubleshooting. It is very much appreciated.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626