CSS (default skin) is not loaded in clean DB

Description

A new installation of the site no longer loads any CSS due to not having a default_skin_id set in the AdminSettings. I suspect caused by where default settings were changed but not codified in DB initialization scripts or startup rake tasks.

Reproduce:

  1. Run reset_database.sh (or rebuild environment completely)

  2. Navigate to the dev site, note that no CSS is displayed

  3. Verify via DB or rails console that default_skin_id is null in AdminSettings

Workaround is to set the default_skin_id either via rails console or just directly in the DB (remember to clear cache).

Suggestion from @tickinginstant:

It seems like it'd be cleaner to set it as part of the skins:load_site_skins task, which is run in the script/reset_database.sh script (which I believe is used by docker). I think it might work to add something like this to the task:

Activity

Show:
Sarken
December 5, 2020, 9:10 PM

reviewer: redsummernight

redsummernight
December 13, 2020, 3:45 AM

In a newly-built image, AdminSetting.first.default_skin_id is set to 1, and the local site has the default CSS. Looks good.

DeployedToBeta

Assignee

tlee911

Reporter

tlee911

Roadmap

None

Priority

Low

Affects versions

Fix versions

Components

BackEnd

Difficulty

Easy

Milestone

Internal 0.9