Location module in use by any of you for multisites?

sethcohn's picture

As posted as an issue in location (http://drupal.org/node/610620)

<

blockquote>
The way location_instance is a multi-type table, storing both uids and nids, means it's (nearly) impossible to share this table between 2 sites...

A typical multi-site shared db does something along the lines of this:

DB A - Only Nodes in Site A , Shared Users
DB B - Only Nodes in Site B, Shared Users
DB User - shared with both A & B, contains user tables, sessions, and other tables that are user related, so both sites can access non-node based info.

If Location were broken into location, location_user and location_node, sharing the location table (with lids), and the location_user table (with uids<->lid relationships) would work great, and no sharing of the location_node table (with nid/vid/genid<->lid relationships)
But the mix means that potentially (realistically-> usually), nids in the location_instance table will point to the wrong NID (ie Nid in Site B, but really refers to Nid in Site A) meaning the data will be all wrong, and conflict, etc.

Splitting location_instance into location_user and location_node would mean a few things would have to change (views integration, some other functions would have to become smarter), but I believe this could be done behind the scenes with little in the way of API changes. Doing query with both users and nodes at the same time becomes slightly harder, since it's no longer a single table, but still doable - and honestly, mixing nodes and users is a bad thing: they are different sorts of objects, and need different method of display/theming/etc/etc...

Anyone have any experience with multisite and location? I've got some ideas how to fix this, but want some input from others...

How are you dealing with this (or are you? Have you given up, or found an answer?)

Groups:
Login to post comments