Active
Project:
Ubercart Domain Access
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Nov 2009 at 18:48 UTC
Updated:
16 Nov 2009 at 20:02 UTC
I have the uc_domain module installed and was perplexed why the uc domain form settings were never getting displayed on the domain_conf_form. I tracked it down to this little one liner.
To see the bug, install uc_domain and try to save some domain-specific settings in the uc section of the form. The values actually do get saved, but then when you redisplay the for, none of the #default_value's on the elements are set.
Index: domain_conf.module
===================================================================
--- domain_conf.module (revision 2934)
+++ domain_conf.module (working copy)
@@ -531,7 +531,7 @@
if (!empty($extra)) {
foreach ($extra as $key => $value) {
foreach (element_children($value) as $element) {
- if (isset($value[$element]['#default_value']) && isset($settings[$element])) {
+ if (!($value[$element]['#default_value']) && isset($settings[$element])) {
$value[$element]['#default_value'] = $settings[$element];
}
}
Comments
Comment #1
agentrickardWhat is the default value that uc_domain is trying to pass?
This looks like a bug in uc_domain for not passing in a #default_value. The change you suggest would only fire if there was no default_value passed in, which is wrong.
Moving to a uc_donate bug.