When adding a view of type "Relation", you get quite a bit of error messages. The most important is probably in the field handler, saying it is missing relation.table.

It would be nice to have Relation view type, but in lack of that it would make sense to remove that view type alltogether.

Comments

dawehner’s picture

Assigned: Unassigned » dawehner
StatusFileSize
new3.38 KB

Here is a first patch + assign for myself.

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new3.99 KB

Here is a real patch which provides proper views integration for the relation base table.

dawehner’s picture

StatusFileSize
new6.01 KB

Here is a test view i created, which could perhaps be used by a views test.

itangalo’s picture

Status: Needs review » Needs work

The view now loads fine, but the field handler "enpoints" won't render anything. (It seems to collect the information though, since it recognizes how many endpoints each relation has.)

Don't know if this is a new feature request or not, but I'm gambling and changing this to "needs work".

rlmumford’s picture

I can't seem to get this view type at all, am I missing something?

Remon’s picture

subs!, views of type relation are completely broken atm.

Remon’s picture

I second @Itangalo, all fields work properly except for "Relation: Endpoints". Actually views' query doesn't seemto JOIN with field_data_endpoints table.
Thanks for the great effort guys!

dawehner’s picture

@Itangalo
Let's get this part in and then fix the rest, the endpoints stuff should perhaps be fixed in #1260252: View relationship "relation -> entity"

itangalo’s picture

Status: Needs work » Reviewed & tested by the community

@dereine: I think the thing with missing endpoints table in the view is separate from #1260252: View relationship "relation -> entity", but it is also separate from this issue. (I think it's due to how relation_endpoints works.)

Starting a new issue about that. This issue is now solved.

seandunaway’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new9.5 KB

Rerolled patch with first attempt at a test for this.

dereine, is there a way to reset a view, including removing results, after execute()?

seandunaway’s picture

Status: Needs review » Fixed

[7.x-1.x-1260236 6c7f787] Issue #1260236 by dereine: Provided proper views integration for the relation base table.
1 files changed, 138 insertions(+), 0 deletions(-)

[7.x-1.x-1260236 063321c] Issue #1260236 by rump: Tests for relation base table views integration.
1 files changed, 46 insertions(+), 10 deletions(-)

Committed.

seandunaway’s picture

Title: View type "Relation" is pretty badly broken » Provide proper views integration for the relation base table.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.