discourse/script/import_scripts
Leonardo Mosquera c83914e2e5
FIX: fix normalize_raw method for nil inputs in migration scripts (#22304)
Various migration scripts define a normalize_raw method to do custom processing of post contents before storing it in the Post.raw and other fields.

They normally do not handle nil inputs, but it's a relatively common occurrence in data dumps.

Since this method is used from various points in the migration script, as it stands, the experience of using a migration script is that it will fail multiple times at different points, forcing you to fix the data or apply logic hacks every time then restarting.

This PR generalizes handling of nil input by returning a <missing> string.

Pros:

    no more messy repeated crashes + restarts
    consistency

Cons:

    it might hide data issues
        OTOH we can't print a warning on that method because it will flood the console since it's called from inside loops.

* FIX: zendesk import script: support nil inputs in normalize_raw
* FIX: return '<missing>' instead of empty string; do it for all methods
2023-06-29 13:22:47 -03:00
..
base DEV: Replace #pluck_first freedom patch with AR #pick in core (#19893) 2023-02-13 12:39:45 +08:00
mbox DEV: Fix random typos (#20937) 2023-04-03 19:27:32 +02:00
nodebb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
phpbb3 DEV: phpBB3 importer should get quoted username from actual post (#20979) 2023-04-05 15:43:20 +02:00
quandora DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
settings FEATURE: Import script for jForum 2020-06-21 12:12:42 +02:00
socialcast DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
support DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
answerbase.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
answerhub.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
askbot.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
base.rb DEV: Enable `unless` cops 2023-02-21 10:30:48 +01:00
bbpress.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
bespoke_1.rb FIX: fix normalize_raw method for nil inputs in migration scripts (#22304) 2023-06-29 13:22:47 -03:00
csv_importer.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
csv_restore_staged_users.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
discuz_x.rb FIX: Removing arbitrary limit in a Discuz importer script query (#21686) 2023-05-23 17:07:09 -04:00
disqus.rb FEATURE: Update topic/comment embedding parameters (#20181) 2023-02-28 14:31:59 +02:00
drupal-6.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
drupal.rb Fix occasional bug in order of imported comments (#20204) 2023-02-08 22:20:46 -05:00
drupal_json.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
drupal_qa.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
elgg.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
flarum_import.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
fluxbb.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
friendsmegplus.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
getsatisfaction.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
google_groups.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
higher_logic.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
ipboard.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
ipboard3.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
jforum.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
jive.rb FIX: fix normalize_raw method for nil inputs in migration scripts (#22304) 2023-06-29 13:22:47 -03:00
jive_api.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
json_generic.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
kunena.rb DEV: Enable `unless` cops 2023-02-21 10:30:48 +01:00
kunena3.rb DEV: Enable `unless` cops 2023-02-21 10:30:48 +01:00
lithium.rb DEV: Enable `unless` cops 2023-02-21 10:30:48 +01:00
mbox.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
modx.rb DEV: Enable `unless` cops 2023-02-21 10:30:48 +01:00
muut.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
mybb.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
mybbru.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
mylittleforum.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
nabble.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
ning.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
phorum.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
phpbb3.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
punbb.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
question2answer.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
sfn.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
simplepress.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
smf1.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
smf2.rb DEV: Enable `unless` cops 2023-02-21 10:30:48 +01:00
sourceforge.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
stack_overflow.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
telligent.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
vanilla.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
vanilla_body_parser.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
vanilla_mysql.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
vbulletin.rb DEV: Enable `unless` cops 2023-02-21 10:30:48 +01:00
vbulletin5.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
xenforo.rb DEV: Enable `unless` cops 2023-02-21 10:30:48 +01:00
yahoogroup.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
yammer.rb FIX: fix normalize_raw method for nil inputs in migration scripts (#22304) 2023-06-29 13:22:47 -03:00
zendesk.rb FIX: fix normalize_raw method for nil inputs in migration scripts (#22304) 2023-06-29 13:22:47 -03:00
zendesk_api.rb FIX: fix normalize_raw method for nil inputs in migration scripts (#22304) 2023-06-29 13:22:47 -03:00
zoho.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00