AVATAR_DIR constant not specified in XenForo import script

Boy, this script is still very broken. The AVATAR_DIR is not specified in the script itself, you have to add it based on this post or the whole thing breaks right off the bat.

Second, the attachments are being stripped out of their locations in the post and just stapled onto the end of each post. So if I had a long trip report with several photos throughout the paragraphs of text, those photos are now [attach] bbcodes where they should be and all the photos are posted inline at the bottom of the post.

I have to admit, I’m a little frustrated here. This is probably my 4th or 5th serious attempt to move to discourse. It seems like having a working importer from xenforo to discourse would be a pretty big boon for the discourse community, but I’ve tried this script several times over the past year, and it just doesn’t work, and it doesn’t seem like hardly anyone is interested in making it work. I understand this is free, and I’m on my own, but it’s just disappointing that something that could bring a lot of people into discourse seems to get so little attention.

I suppose I’ll check back in another six months or so and see if there’s been any improvements. Maybe 6th time’s the charm?

The only people interested in making it work are interested in making it work for the community they are Migrating. Yours is different. The existing script is broken for your community but has worked for others. Every import is a snowflake.

The likelihood that it’ll ever just work for you is pretty slim. It will almost certainly require several hours work from someone who’s familiar with import scripts or a good deal more than that for a decent programmer whose unfamiliar with discourse or ruby (I wrote several importers before I knew ruby).

Oh. That’s more than I would have guessed.

I think I may have written similar code to deal with attachments that are sometimes embedded in the post and sometimes not myself, but I wasn’t generous enough to make a PR.

2 Likes

Why do you call a script that works pretty well, but which takes a few minutes to figure out the AVATAR_DIR and which does not always place the attachments in the correct spot “very broken” and “it just doesn’t work”? I have done over 20
imports with that script, (and wrote the avatar code and enhanced the attachment import). It’s not broken.

I suggest you change the code and submit a PR instead of waiting 6 months to see if someone was nice enough to open source more code without getting appreciated :+1:t3:

2 Likes

I appreciate your contributions, but I call it broken because you left out a key piece of code that makes the script fail before it even starts churning data. That’s kind of the definition of the word in this context. Again, I’m not attacking you, I’m just letting others know.

That feels a little crazy to me because I’m basically working from a fresh xenforo install (long story). If it can’t work in such a pristine state, then yeah, I agree with you, it looks like discourse just isn’t in the cards for my community.

Oh, I’m not feeling attacked - I just think you need to put your effort into making a PR or writing a guide.

I didn’t leave out any code, you just need to set an environment variable.

Not every install is the same, it depends on the upgrade path that was taken. The script has probably never been used on a fresh install :wink: And most forums that the script was written on, had plugins and mods and bugs that did odd things to the database.

It might feel “crazy”, but maybe you need to see the glass as almost full instead of a bit empty. The script gives you 99%. So yeah, it might need some extra effort to make it 100% perfect for you. But it’s working and not broken. It did not need modifications on the last few imports I did with it.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.