Closed (fixed)
Project:
Node Reference URL Widget
Version:
6.x-1.6
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Mar 2011 at 23:40 UTC
Updated:
30 Aug 2011 at 04:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
tgshannon commentedThis are my field setups.
field_mother
Label: Mother
Widget type: Reference from URL
Fallback behavior: *
Use autocomplete widget
If no content is referenced in the URL, determine how the form should be handled.
Use fallback behavior when editing content
create link on full view
link title: Add child
return path: the new node (no redirect)
field_spouse
Label: Spouse
Widget type: Reference from URL
Fallback behavior: *
Use autocomplete widget
If no content is referenced in the URL, determine how the form should be handled.
Use fallback behavior when editing content
create link on full view
link title: Add spouse
return path: the new node (no redirect)
Comment #2
quicksketchHm, I'd agree that this is unusual behavior. This module wasn't really designed to work with more than one node reference field on the same content type. Note that you can work around this issue by using a module like Custom Links, and instead of making links like
node/add/[type]/[nid], you can make links tonode/add/[type]?spouse=[nid], and Node Reference URL Widget will pick up the relationship that way. Read the README.txt for more information on this approach.So this definitely still qualifies as a bug, but one that you can work-around relatively easily. Perhaps the solution for Node Reference URL Widget is to make the automatically-created links follow this same pattern when more than one node reference field is on the new node type.
Comment #3
quicksketchA similar issue: #805364: Node Reference URL widget with three nodes?.
Comment #4
henrijs.seso commentedjust to make life easier, lets change default pattern like ?field=[nid]. Im not big fan of idea thou, since field names are 1) usually ugly and 2) could tip off some setup architecture, naming convention or pattern and therefore be security hazard
Comment #5
quicksketchThat sounds like a good idea to me, but I think we should only take that approach if there is a reason to use that format (such as if there are multiple fields). I personally like the "short" format unless there are unusual circumstances.
Comment #6
quicksketchI've committed these patches to address this problem.