• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed  [attach] bug with importer

D.O.A.

Well-known member
#1
Coming across from vb3 latest for testing this out, all went well with 14,763 attachments imported.

But it seems users who used the 'quick input' thing with attachments in vb3
[ attach ]123456[ attach ], are linking to images from the attachement folder, not even connected with the post. The attachments that should be there are embeded as normal though, and showing. Some people on my forums post text, then [insert attachment] and post more text [another attachment] etc.

So if I had 6 images embeded like above I'd end up with twelve in the post, 6 correct ones embed at the bottom as as normal and 6 messed up links like this View attachment 123456
 

Jake Bunce

XenForo moderator
Staff member
#2
The attachmentids are not preserved during an import, and those [ attach ] tags obviously reference the ids. I am guessing that is the nature of your problem. It should be possible to write code to update those inlined attachments during the import, but I envision that code being pretty nasty.

You will probably have to live with it.
 

Rob

Well-known member
#3
The attachmentids are not preserved during an import, and those [ attach ] tags obviously reference the ids. I am guessing that is the nature of your problem. It should be possible to write code to update those inlined attachments during the import, but I envision that code being pretty nasty.

You will probably have to live with it.
Yeah, it might be a bit *consuming* to find/replace across the entire post table for every attachment id. To be honest the code wouldnt be that bad but it would take ages to run - however, not as long as importing threads/posts.

This should be an easy ish fix
 

D.O.A.

Well-known member
#6
I ended up using a regular expression (\[ATTACH.*\]) and cleaning them out of the pre- import vbulletin post sql.
 

Jesepi

Well-known member
#7
It could also be an option at the time of running the import to "strip old [ attach ] tags from posts" to clean things up. As it is now, posts have links to un-related attachments in the actual post, with the correct attachments still being shown at the bottom of the post.
 

D.O.A.

Well-known member
#8
As far as bugs go, this one sucks. Considering my forums are attachment orientated even more so. They really should be stripped out during the import process, it's not good having these unrelated attachment links, like I said earlier I've seen my admin area attachments randomly appear in public threads. As inline attachments are a vbulletin standard as much as a post is it should be reflected in the import process, full stop.
 

Janmaat

Active member
#9
As far as bugs go, this one sucks. Considering my forums are attachment orientated even more so. They really should be stripped out during the import process, it's not good having these unrelated attachment links, like I said earlier I've seen my admin area attachments randomly appear in public threads. As inline attachments are a vbulletin standard as much as a post is it should be reflected in the import process, full stop.
+1 from me!
 

dmnkhhn

Active member
#10
I didn't know inline attachments are not imported/converted correctly.

This means a new entry to my list of things that stop us from converting. :(
 

gordy

Well-known member
#11
I didn't know inline attachments are not imported/converted correctly.

This means a new entry to my list of things that stop us from converting. :(
Same here, major setback. Many of my reviewers posts are text,image,text,image,etc now the thumbnails are all jumbled at the bottom of each post. The attachments aren't even available when I go to edit the post, :mad:
 

AndreaMarucci

Well-known member
#14
I know that this question os maybe offtopic here but since this problem is also in the V4 importer, when do you plan to release an official importer for V4?