Needs review
Project:
Entity reference
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Nov 2016 at 19:34 UTC
Updated:
12 Nov 2019 at 12:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
geek-merlinPatch flying in that fixes this issue for me.
It extends the "pass 0" logic for empty entity IDs to all other empty args.
(I'm not too happy with this, but i don't expect the underlying views question will ever be fixed in D7.)
(Quite some people consider anything that views does after such a long time a feature not a bug ;-)
Comment #3
mustanggb commentedIs this related to, or a duplicate of #2815863: Contextual filter values of "" don't trigger "When the filter value is NOT available"?
Comment #4
Anonymous (not verified) commentedPatch worked for me, thanks
Comment #5
joelpittetThe solution in #2 seems like it needs more thourough debug into the root cause. Setting all the empty values to 0, should be done in views if it's really correct way forward.
Comment #6
david.qdoscc commentedFor me this patch still didn't address the issue with [node:nid] resulting in an error Notice: Undefined property: stdClass::$nid in node_tokens()
I did get around this by using [current-page:url:unaliased:args:value:N] instead of [node:nid] to pass the ID when editing existing content but pass a 0 when adding new content.
Comment #7
panchoComment #8
marksmith commentedSolution #6 works if (A) entity reference field widget type is (multiple value) select list, but not with (B) ER multiple value autocomplete field (with Add more button). (B) is preferred in some cases where selected value order is important.