Base.rb Import script error on latest build (Discourse::InvalidParameters)

(Bryan Underwood) #1

I just pulled the latest build during a ./launcher rebuild app and came across this error message w/call stack when I ran my custom import script that I have been running a lot:

Here’s my output w/call stack:

Loading existing groups...
Loading existing users...
Loading existing categories...
Loading existing posts...
Loading existing topics...
/var/www/discourse/lib/site_settings/type_supervisor.rb:172:in `validate_value': value (Discourse::InvalidParameters)
        from /var/www/discourse/lib/site_settings/type_supervisor.rb:126:in `to_db_value'
        from /var/www/discourse/lib/site_setting_extension.rb:312:in `add_override!'
        from /var/www/discourse/lib/site_setting_extension.rb:420:in `block in setup_methods'
        from /var/www/discourse/lib/site_setting_extension.rb:347:in `set'
        from /var/www/myscripts/base.rb:77:in `block in change_site_settings'
        from /var/www/myscripts/base.rb:75:in `each'
        from /var/www/myscripts/base.rb:75:in `change_site_settings'
        from /var/www/myscripts/base.rb:32:in `perform'
        from ../myscripts/import.rb:107:in `<main>'

I was able to trace it out to a change that is provided by downloading the latest base.rb file, thanks to @techAPJ (nice work, thanks for all of this):

Basically one of the system settings changed from a bool data type to varchar (or whatever data type 7 is). So the fix is to download the latest base.rb file or simply be sure to use the included base.rb file in /var/www/discourse/script/import_scripts.

This is related to the greater system-wide change in this commit: