FIX: Do not use cached settings during theme compilation

We compile within a database transaction, so using a cached value from redis can cause unwanted side effects
This commit is contained in:
David Taylor
2020-05-01 17:51:11 +01:00
parent 4f885d7da2
commit a51b8d9c66
4 changed files with 24 additions and 20 deletions

View File

@ -119,7 +119,8 @@ class ThemeField < ActiveRecord::Base
js_compiler.append_js_error(error)
end
js_compiler.prepend_settings(theme.cached_settings) if js_compiler.content.present? && theme.cached_settings.present?
settings_hash = theme.build_settings_hash
js_compiler.prepend_settings(settings_hash) if js_compiler.content.present? && settings_hash.present?
javascript_cache.content = js_compiler.content
javascript_cache.save!