On admin/ecsettings/location screen i have
warning: Invalid argument supplied for foreach() in /home/immorta1/public_html/subdomens/site702/includes/form.inc on line 949.
warning: Invalid argument supplied for foreach() in /home/immorta1/public_html/subdomens/site702/includes/form.inc on line 949.
warning: Invalid argument supplied for foreach() in /home/immorta1/public_html/subdomens/site702/includes/form.inc on line 949.
warning: Invalid argument supplied for foreach() in /home/immorta1/public_html/subdomens/site702/includes/form.inc on line 949.
i think maybe this my problem, but i display in store.admin.inc file, in _store_location_settings_form function, this code
// Physical dimensions
$measures = _store_location_measures();
// my code begin
echo '
'; print_r($measures); echo '
';
// my code end
and i see this array
Array
(
[LB] => Array
(
[type] => weight
[name] => Pounds
[factor] => 0.45359237
)
[G] => Array
(
[type] => weight
[name] => Grams
[factor] => 0.001
)
[KG] => Array
(
[type] => weight
[name] => Kilograms
[factor] => 1
)
[OZ] => Array
(
[type] => weight
[name] => Ounces
[factor] => 0.0283495231
)
[IN] => Array
(
[type] => length
[name] => Inches
[factor] => 0.0254
)
[FT] => Array
(
[type] => length
[name] => Feet
[factor] => 0.3048
)
[CM] => Array
(
[type] => length
[name] => Centimetres
[factor] => 0.01
)
[M] => Array
(
[type] => length
[name] => Metres
[factor] => 1
)
[IN2] => Array
(
[type] => area
[name] => Square Inches
[factor] => 2
)
[FT2] => Array
(
[type] => area
[name] => Square Feet
[factor] => 2
)
[CM2] => Array
(
[type] => area
[name] => Square Centimetres
[factor] => 2
)
[M2] => Array
(
[type] => area
[name] => Square Metres
[factor] => 1
)
[IN3] => Array
(
[type] => volume
[name] => Cubic Inches
[factor] => 3
)
[FT3] => Array
(
[type] => volume
[name] => Cubic Feet
[factor] => 3
)
[CM3] => Array
(
[type] => volume
[name] => Cubic Centimetres
[factor] => 3
)
[M3] => Array
(
[type] => volume
[name] => Cubic Metres
[factor] => 1
)
)
BUT
$form['dimensions']['ec_measure_weight'] = array(
'#default_value' => variable_get('ec_measure_weight', 'LB'),
'#description' => t('Default unit measure of weight.'),
'#options' => $measures['weight'],
'#title' => t('Weight'),
'#type' => 'select'
);
$measures['weight'] -> array is NULL
Sorry, maybe this problem have other people or this happens with me only?
Comment | File | Size | Author |
---|---|---|---|
#10 | store.patch | 2.12 KB | fgm |
Comments
Comment #1
EliteMonk@drupal.ru CreditAttribution: EliteMonk@drupal.ru commentedsorry code display with errors sorry, but i think you see my idea....
Comment #2
Soren Jones CreditAttribution: Soren Jones commentedIt seems likely you're aware of this. But like EliteMonk states above, the options for the selects in Physical dimensions, lines 237-272 of store.admin.inc, are looking for the arrays $measures['weight'], etc, but the available arrays are $measures['LB'], etc. Maybe an issue with lines 456-467 of store.localizaion.inc? Or maybe just some unfinished coding?
Comment #3
Soren Jones CreditAttribution: Soren Jones commentedChanging status to normal. I don't think this is critical, but if it is someone go ahead and change it back.
Comment #4
tassoman CreditAttribution: tassoman commentedi had the same problem here.
Comment #5
Phillip Mc CreditAttribution: Phillip Mc commentedsame problem here with the latest 5.x-4.x-dev version (downloaded march 23rd 2008)
Comment #6
open-keywords CreditAttribution: open-keywords commentedSame with code March 27th, PHP 5.2.1 on Ubuntu Feist
Comment #7
open-keywords CreditAttribution: open-keywords commentedsee also http://drupal.org/node/234679
Should be a report in Form ?
Comment #8
open-keywords CreditAttribution: open-keywords commentedIn fact Forms looks to be stable http://cvs.drupal.org/viewvc.py/drupal/drupal/includes/form.inc?view=log...
I would add that I use the multi-site feature (multiples sites with the same code base, but a different database)
Comment #9
Phillip Mc CreditAttribution: Phillip Mc commentedsame problem here with the latest 5.x-4.x-dev version (downloaded march 27rd 2008). tried it with Drupal 5.8 -beta and Drupal 5.7
(sorry to cross post but are any of you guys getting the same errors as me with the ecommerce 5.x.4-x-dev? in particular the EDIT/VIEW tabs disappearing on the my account page and the missing store_mail_types function error when enabling store.module?. I'm not sure whether I should go looking for what might be causing the problem or where i.e.ecommerce/drupal.)
Comment #10
fgmHere is a patch. As it seems you are using git, it is rolled with git diff : just tell me if you need it done against a CVS version instead.