Quantcast
Viewing latest article 4
Browse Latest Browse All 57

Defect #7104 (New): Accessing core Setting.* values in a plugin's init causes the plugin's settin...

If you access a core value from Setting, such as host_name from a plugin's init.rb, then the plugin's settings will not be properly loaded.

To reproduce, create a simple plugin that does something like:

myurl = Setting.host_name

and then add in some settings

settings :default => {
'myvar' => 'myval'
}, :partial => 'settings/mysettings'

And then try to access the configure page from Administration / Plugins. You can also go in to the console and try to access Setting.plugin_#{your_plugin_name} here -- you will see it is not available. Meanwhile, all aspects of your plugin work fine, other than the settings and anything that tries to reference the settings.


Viewing latest article 4
Browse Latest Browse All 57

Trending Articles