phpBB 3 Importer (old)

Hm… on the road again. Now I’ve hit my first exception with

17711 / 185464 (  9.5%)Exception while creating post 21182. Skipping.
Cannot call method 'slice' of undefined
at convert_tree_to_html (/var/www/discourse/vendor/assets/javascripts/better_markdown.js:495:23)
at convert_tree_to_html (/var/www/discourse/vendor/assets/javascripts/better_markdown.js:621:21)
at convert_tree_to_html (/var/www/discourse/vendor/assets/javascripts/better_markdown.js:621:21)
at toHTMLTree (/var/www/discourse/vendor/assets/javascripts/better_markdown.js:419:16)
at Discourse.Dialect.cook (/var/www/discourse/app/assets/javascripts/discourse/dialects/dialect.js:194:23)
at makeHtml (/var/www/discourse/app/assets/javascripts/discourse/lib/markdown.js:230:34)
at <eval>:1:44
/var/www/discourse/lib/pretty_text.rb:152:in `block in markdown'
/var/www/discourse/lib/pretty_text.rb:299:in `block in protect'
/var/www/discourse/lib/pretty_text.rb:297:in `synchronize'
/var/www/discourse/lib/pretty_text.rb:297:in `protect'
/var/www/discourse/lib/pretty_text.rb:133:in `markdown'
/var/www/discourse/lib/pretty_text.rb:172:in `cook'
/var/www/discourse/app/models/post_analyzer.rb:12:in `cook'
/var/www/discourse/app/models/post.rb:157:in `cook'
/var/www/discourse/lib/post_creator.rb:116:in `before_create_tasks'
/var/www/discourse/app/models/post.rb:372:in `block in <class:Post>'

…that post is basically:

Text…[url]hier isses[/url]
Text…<!-- s:oops: --><img src="{SMILIES_PATH}/blushing.gif" alt=":oops:" title="Oops" /><!-- s:oops: --> 
Text…
Text…[img:af987]http&#58;//img19&#46;imageshack&#46;us/img19/3920/bild23ni&#46;png[/img:af987]
…some more text…

and… <!-- s:!: --><img src="{SMILIES_PATH}/excemation2.gif" alt=":!:" title="Exclamation" /><!-- s:!: -->

…the empty url-BBcode is stupid, sure - could that cause an exception? If so, one might be tempted to ignore the error, the “skipping” is the only part that could be improved in that case. As a side note, the first exception was the moment when the machine started to use swap memory… not excessively, but anyway… :frowning:

1 Like