Hey Brandon,
at the moment, locations stored via the locations_cck.module's CCK field, are stored in the resp. CCK-table as well as in the /locationlocation_instance tables - but there (in the location_instance table) they are *not* associated with the node's nid/vid.
Therefore, such nodes with location cck data are not showing in location-based/proximity-filtered views and other places.
I think this is the cause of some other issues, too (http://drupal.org/node/327381, http://drupal.org/node/333651).

The attached patch fixes this with a very small change to location_cck.module - please commit this to HEAD.
Perhaps this is meant to be by design (compare http://drupal.org/node/339459) but is nevertheless a problem in many cases. If the association of location_cck field data and the resp. node should not happen automatically in every case, then this should be made an option for the resp. cck-field.

CommentFileSizeAuthor
location_cck.module.SAVE_NID_NID.patch496 bytesdanielnolde

Comments

droople’s picture

Title: CCK location not available to views/proximity-filtering > PATCH included » CCK location not available to views/proximity-filtering > PATCH failed for 5.x

This patch failed for http://drupal.org/node/327381 and http://drupal.org/node/333651

"Hunk #1 FAILED at 160.
1 out if 1 hunk FAILED -- Saving rejects to file location_cck_module.rej"

Thank you

danielnolde’s picture

the patch was built against the location 6.x-3.x-dev version from 2008-12-05.
Maybe the resp. location-cck.module's file is slightly in the D5 version.
Then simply try to find manually the one line to alter, just look in the patch file and in the resp. code file, it's not too hard to patch in manually (since it is really just an extension to one single line).

asak’s picture

Looking in location_cck.module for D5 - I can't find such line...

socialnicheguru’s picture

i am having this problem too. it is frustrating i am on D5.10 and location 3.0. this patch is not working :(

socialnicheguru’s picture

this worked to fix the proximity filters. It should be put into Head for 5.x.3. I include it because it might also work for location 6.

http://drupal.org/node/326749#comment-1155243

danielnolde’s picture

Hey Brandon,

what about this small proposal & patch to "sync" the location_cck field values with location_instance table (one-line patch)?
By now, this is - intentionally - missing in the location_cck.module, rendering it useless for all kinds of location processing/search etc.!
Other people keep reporting this lack-by-design as bug, and need the functionality provided by above one-line patch (like http://drupal.org/node/327381 / http://drupal.org/node/333651 / http://drupal.org/node/382778 / http://drupal.org/node/63952 / http://drupal.org/node/363698 / http://drupal.org/node/386848 / http://drupal.org/node/391160 / http://drupal.org/node/366880 / http://drupal.org/node/346605 ).
This one-line patch is *really* simple to apply (like in one minute).
If you desperately want to stick to the lack-by-intention of not associating cck-locations with the location_instance-table, then would you at least be willing to commit a solution where the admin, when creating a location_cck field instance, can choose whether or not to associate a particular location_cck-field with the location_instance-table?
I would code this flexible version, if you are willing to commit this into location_cck.module, Brandon (just send me a private message, and i'll start).

cheers,

daniel

yesct’s picture

yesct’s picture

marked #333651: CCK locations not appearing on google map as a duplicate of this issue.

yesct’s picture

marked #344397: Location form using markup instead of fieldset as a duplicate of this issue [edit: opps fixed color coding of issue reference]

phillamb168’s picture

Hiya,

So, I'm thankful I ran across this post. My current version of CCK_Location (v 1.5.2.9 2009/02/25 17:42:14) on a D6 (latest version) is now fully functional within views once I run this patch. What do I need to do to confirm that this fixes the problem?

q0rban’s picture

Status: Needs review » Closed (duplicate)

So, I ran into this same thing, but from what I can tell, this is not the proper fix (See this comment). Marking as duplicate of #383244: location_cck back compat and views support

pursuitofliberty’s picture

sub