Closed (fixed)
Project:
Location
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 May 2009 at 13:27 UTC
Updated:
2 Feb 2010 at 16:40 UTC
I couldn't think of a better title, but from line 388 of the location_cck.module, you find:
...
$location = array(
'hide' => array_keys(array_filter($item['location_settings']['display']['hide'])),
'location' => location_load_location($item['lid']),
);
// @@@ This is rather silly, but I can't think of anything better at the moment.
template_preprocess_location($location);
...
The problem is that $item does not contain the 'location_settings' element, thus there is no way to know which fields are set to be hidden. I have no idea how to fix this, but this also relates to another issue http://drupal.org/node/373465.
Comments
Comment #1
yesct commentedUsing [#nnnnnn]
#373465: Array errors in location_cck module
Comment #2
pcambraI think that this has something to do with these coments in the code of location_cck module:
When you don't fill anything in the location info, the $object that is passed to the token values is almost empty, and doesn't contain the ['location_settings']['display'] property required for solving this issue.
I am getting the errors related in the #373465: Array errors in location_cck module issue when including location fields with Content Profile as non-required in the registration form in my site.
Anyone can give an advice on this?
Thanks!
Comment #3
drew reece commentedTry the patch in #60
Comment #4
bdragon commentedMarking this fixed.
I now think that there's no need to bother with hidden when working with tokens anyway.
Back in July 2009, I committed a change to just pass an array() and then forgot to update this issue.