Closed (fixed)
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Sep 2010 at 23:57 UTC
Updated:
1 Oct 2010 at 19:30 UTC
Since entity fields are now core, I'm not sure whether this is a core issue or a views issue, but it seems to me that when I attempt to create a relationship, the fields list contains almost nothing...no fields from the (entity) content type(s). The last update I did was for the Sep 10 snapshot.
Comments
Comment #1
dawehnerI don't know why there should be relationships in there. Core defines no way to relate content via fields.(beside taxonomy)
Comment #2
j. ayen green commentedOk. My wording was incorrect. I had opened a different ticket awhile back about nodereference fields not appearing in the relationship field list in the views ui. You reminded me then that the module is responsible for the visibility of the field, and moved the ticket.
So with this one, since the fields are simply fields added to the content type, such as a text field, and would thus not come from a contributed module, I didn't know whether this is a view issue, that the relationships field list is practically bare, or whether it's D7 that's the culprit.
Comment #3
j. ayen green commentedComment #4
dawehnerWhy should a textfield appear there? The nodereference is not part of drupal, it's in the cck 7.x module.
Comment #5
j. ayen green commentedIn trying to simplify the description I confused it. The nodereference was a different ticket...I only mentioned it as an example.
The issue is purely this. I have entity Phone, in which the node title is a phone extension. I have entity Employee, in which there is a field phone_extension. When I create a view filter pointing at one entity type, I want next to establish a relationship to the second. The relationship field list contains no field from either. Just like the Sort criteria field list, it seems to display no entity fields. I mentioned 'textfield' simply to point out that the missing fields are of the type now core to D7 ... not field types introduced by a contributed module as in D6.
Comment #6
dawehnerI still don't get why there should be a relationship. You want a relationship based on what? A reference between entities?
Comment #7
j. ayen green commentedI'm not sure I understand your question. The relationship in the Views UI results in a Join. What are you joining (relating) in a view if not two content types? Did this change from D6??
Maybe if we work on this from the other direction, instead. I notice that likewise, the Sort criteria contains none of the fields added to the content type ... is it that this simply is not working yet, or is it a change? Again, going by D6 and Views 2, if I add 5 fields to a content type, they would then be present in the Filter list, Fields list, and the Sort criteria list ... but none appear at this point in Sort criteria. I'm thinking that whatever is causing that might be the same issue with regards to the Relationship field list.
Comment #8
steven jones commentedI think what dereine is asking is what field is relating your two entities? A node reference field?
But you are also saying that aside from relationships, sorts for any fields added to entities are not appearing in the views UI?
Comment #9
j. ayen green commentedI was not referring to a node reference field. That isn't a requirement, is it? Again, I could be remembering incorrectly, but I don't recall the nodereference module having been a prerequisite for using a view relationship?
I'm under the impression that outside of views, if I have employee-number being a field in table A, and phone-extension-employee-number being a field in table B, I would add
JOIN tableB on (tableA.employee-number = tableB.phone-extension-employee-number)
and that in a view I use relationship for the same thing. I might seriously be forgetting something important...like that this isn't the case :-)
Regarding the sort criteria, that is correct...none of the added fields in the content type I am filtering for appear in the sort criteria list.
Comment #10
dawehnerIf this two things are fields this is feature request. There is an issue already
Comment #11
j. ayen green commentedI don't have any problem with it being handled as a feature request, if we're talking about the same thing. I just want to be sure we are.
So, 2 questions:
1. What -does- Relationships currently populate its field list with? Because there seems only to be less than a dozen fields in it, unrelated to either content type.
2. Should I open a separate issue regarding the Sort field list?
Comment #12
dawehnerYes create a new issue.