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?

CommentFileSizeAuthor
#10 store.patch2.12 KBfgm
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

EliteMonk@drupal.ru’s picture

sorry code display with errors sorry, but i think you see my idea....

Soren Jones’s picture

It 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?

Soren Jones’s picture

Priority: Critical » Normal

Changing status to normal. I don't think this is critical, but if it is someone go ahead and change it back.

tassoman’s picture

i had the same problem here.

Phillip Mc’s picture

same problem here with the latest 5.x-4.x-dev version (downloaded march 23rd 2008)

open-keywords’s picture

Same with code March 27th, PHP 5.2.1 on Ubuntu Feist

open-keywords’s picture

see also http://drupal.org/node/234679
Should be a report in Form ?

open-keywords’s picture

In 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)

Phillip Mc’s picture

same 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.)

fgm’s picture

Status: Active » Needs review
FileSize
2.12 KB

Here 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.