mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FIX: Unable to change homepage style via wizard (#19462)
Depending on the current state of things, sometimes the homepage style wouldn't update because we were incorrectly blocking updates the `desktop_category_page_style` site setting if the first item in the top menu was 'categories'. Added a test case to handle this situation. See https://meta.discourse.org/t/248354
This commit is contained in:
@ -166,7 +166,7 @@ class Wizard
|
||||
if updater.fields[:homepage_style] == 'latest' && top_menu[0] != "latest"
|
||||
top_menu.delete("latest")
|
||||
top_menu.insert(0, "latest")
|
||||
elsif updater.fields[:homepage_style] != 'latest' && top_menu[0] != "categories"
|
||||
elsif updater.fields[:homepage_style] != 'latest'
|
||||
top_menu.delete("categories")
|
||||
top_menu.insert(0, "categories")
|
||||
updater.update_setting(:desktop_category_page_style, updater.fields[:homepage_style])
|
||||
|
Reference in New Issue
Block a user