Vanilla2 Import - no avatars, no pdf attachments

Hello Discourse,
i’ve imported my existing Vanilla2 forum using the Vanilla2export.php and

RAILS_ENV=production ruby script/import_scripts/vanilla.rb /shared/export.csv

However user avatars and attachments were not imported.
On my original website i don’t see any GET requests for avatars and PDF attachments.

In the vanilla.rb importer, there is a reference to a photo:

u = { id: user[:user_id], email: user[:email], username: user[:name], created_at: parse_date(user[:date_inserted]), bio_raw: clean_up(bio_raw), avatar_url: user[:photo], moderator: @user_roles.select { |ur| ur[:user_id] == user[:user_id] }.map { |ur| ur[:role_id] }.include?(moderator_role_id), admin: @user_roles.select { |ur| ur[:user_id] == user[:user_id] }.map { |ur| ur[:role_id] }.include?(admin_role_id), }

Is it how the import is supposed to work - meaning, no avatar and attachment import or am i doing something wrong here?

Or are there perhaps some post-import tasks, which i missed?

Many thanxs for help
martin

I’m afraid none of the importers we have for vanilla supports avatars/attachments. If you feel like adding it, we would happily merge a pull request :wink:

Many thanxs! :smile:
I was unsure if it is “works as designed” or a user (my) error :blush:

Are there any guidelines regarding extending importers maybe?

Not that I know of. Just improve the code of the script/import_scripts/vanilla.rb file :wink:

2 Likes

@buzzdev - did you come up with a solution? Curious if anything has changed as far as Vanilla avatar importing.