I have an schema as described here: http://drupal.org/node/810790. Basically, there is a table Properties, with node references for location, in this way: Properties > Area > City > State.
The thing is that I want to store the State, but just internally, but I need a view with a location hierarchical select filter, where I can select the city and the area, or just the city. But with my configuration I always have to select the State first, I need that City is the first level in the hierarchy select. I need a filter with only the two deepest levels.
On properties I have three values for location, and I´m saving the the whole lineage. Configuring the filter in Node reference path I select Areas.Cities -> Cities.States, if I only select Areas.Cities, the filter doesn't work properly.
Can anyone help me with this? I think this can be quite common.
Thanks in advanced!
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | cityaddress2.jpg | 23.04 KB | jrao |
| #5 | cityaddress.jpg | 21.49 KB | jrao |
Comments
Comment #1
taote commentedNobody? I think this is feature is really needed
Comment #2
jrao commentedSorry, I'm currently tied up in other project and won't be able to look into this until sometime next week.
Comment #3
taote commentedOk, thank you. Please let me know as soon as you can, and if there is something I can do to help.
Comment #4
taote commentedAny progress? Thanks.
Comment #5
jrao commentedI tested this using the test setup in http://drupal.org/node/626088, basically I reused State/City/Address, and added a new content type Properties, which has a node reference to Address (reference path=Address.City-City.State, save lineage, number of values=3, content types=Address/City/State). I then added a view with filter Content:Address exposed (selection type=Hierarchical Select, node reference path=Address.City), it seems to work without problem (see attachment).
Comment #6
taote commentedHi. Thank you for testing.
I have the same scenario, my content type is defined in the same way.
Also the view, but when in the view filter I select for the node reference path:
If I choose the empty one, the first select in the filter contains State and City values, and I only want City values. Is this happening to you too? Is there anything else I could try?
Thanks again!
Comment #7
jrao commented"And then there is a second select, with two options: empty and a City.State option.": This is correct, you should choose the empty one.
"If I choose the empty one, the first select in the filter contains State and City values": I'm not sure why this is happening, but it's not the case in my test instance, see attachment.
Comment #8
taote commentedjrao thanks again for your time. I revised everything. The behaviuor is very strange, because in the first select I get a mix of state and cities values, but when I select a value corresponding to a state, in the second select I get area values.
You can see an example here, under the label Localizacion, maybe this could help. I'm in a hurry because I need to finish this website, and I don't know how to make it work.
Comment #9
jrao commentedI see the problem, but I'm not certain why this is the case, can you give me admin access so that I can take a look inside? You can send it to my email via the Contact tab of my account.
Comment #10
jrao commentedI took a quick look around, one difference between our setup is your address content type has number of values =2 and references both city and state, in my case, it has number of values = 1 and only references city. Not sure if this is relevant yet, will do more testing on my end later.
Comment #11
taote commentedYes, trhat's the key. I changed it temporarily to 1 value, referencing only cities and it was working fine (apart from a lot of warnings). But, in theory it should work with two values. I changed it back.
Well, I don't know why you need 3 values, because for a real entity relationship, in properties I should only need the address value.
Ok, at least now we have a clue.
Thank you for your help jrao.
Comment #12
jrao commentedFinally got some time to debug this, it's a bug in the module, it will appear when root field is also using this module. I have checked in a fix.
Comment #13
jrao commented