Error while importing PhpBB attachments


#1

Hello!

My Discourse instance is up and running. Everything went well for users, posts and categories, except for the attachments:

creating topics and posts
     6315 / 6315 (100.0%)
creating private messages
       52 / 52 (100.0%)
Importing attachments...

      124 / 6419 (  1.9%)  /var/www/discourse/script/import_scripts/base.rb:570:in `html_for_upload': wrong number of arguments (1 for 2) (ArgumentError)
        from script/import_scripts/phpbb3.rb:411:in `block (2 levels) in import_attachments'
        from script/import_scripts/phpbb3.rb:360:in `gsub!'
        from script/import_scripts/phpbb3.rb:360:in `block in import_attachments'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/relation/batches.rb:52:in `block (2 levels) in find_each'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/relation/batches.rb:52:in `each'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/relation/batches.rb:52:in `block in find_each'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/relation/batches.rb:125:in `find_in_batches'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/relation/batches.rb:51:in `find_each'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/querying.rb:9:in `find_each'
        from script/import_scripts/phpbb3.rb:355:in `import_attachments'
        from script/import_scripts/phpbb3.rb:48:in `execute'
        from /var/www/discourse/script/import_scripts/base.rb:77:in `perform'
        from script/import_scripts/phpbb3.rb:488:in `<main>'

Anyone knows what’s wrong ?


(Gerhard Schlager) #2

What version are you using?
I’ve fixed that a few days ago.

https://github.com/discourse/discourse/commit/519c875d87a83d4fc9332e1a56991399a557d8b5


#3

Thank you so much!
I’have updated Discourse a few days ago and didn’t tought some files may be fixed…