The query function in the views relationship is ignored, as the parent function is called first. It needs to be called last, to build the query with the desired extra join.

The old extra join array is producing error and needs to be fixed too.

This issue can be reproduced, when making two queues, one simple and one multi. Add an entity with the same id in both of them. Then add a views relation for the subqueue, and the item in from simple queue is also taken.

Comments

ytsurk created an issue. See original summary.

ytsurk’s picture

StatusFileSize
new755 bytes

Here the patch reversing the order, building the query correctly.

ytsurk’s picture

StatusFileSize
new1.1 KB

This patch now also fixed the join_extra "array syntax".

ytsurk’s picture

Issue summary: View changes
ytsurk’s picture

Title: Subqueue views relation » Subqueue views relation: Doubled/redundant entries
ytsurk’s picture

  • amateescu committed 538dffa on 8.x-1.x authored by ytsurk
    Issue #2837841 by ytsurk: Subqueue views relation: Doubled/redundant...
amateescu’s picture

Status: Needs review » Fixed

Committed to 8.x-1.x. Thanks!

josebc’s picture

this patch have an issue, parent::query(); should be inside query()

josebc’s picture

Status: Fixed » Needs work
ytsurk’s picture

StatusFileSize
new1.11 KB

Shit .. so true .... @josebc - you got a good eye :D

I'm sorry for this mistake!

  • amateescu committed 4728766 on 8.x-1.x
    Issue #2837841 followup: Fix EntityQueueRelationship::query() to call...
amateescu’s picture

Status: Needs work » Fixed
StatusFileSize
new544 bytes

Oops :) I just committed the patch attached to fix it quickly.

ytsurk’s picture

we're in the fast lane here :D

mfernea’s picture

I tested this by applying patches at #3 and #13 on alpha6 and it works fine.

ytsurk’s picture

yes it's #3 and #13 (as commited to the dev branch) or #11 ;)

Thx for testing!

giuliovale’s picture

I also confirm #3 and #13 over alpha6 work fine

Status: Fixed » Closed (fixed)

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