Active
Project:
Node Connect
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Mar 2011 at 20:08 UTC
Updated:
30 Jun 2014 at 15:39 UTC
Jump to comment: Most recent
Comments
Comment #1
glottus commentedEdited the issue title to include related information.
The green "+ (add new)" button triggers a function that validates the form first, and if that is a required field, it won't accept navigating away while the field is blank.
On the other hand, if a user has entered any text at all, but it hasn't matched an existing node (the very reason to have the "add new" button in the first place), then the function will fail with a warning that "[FIELD NAME]: found no valid post with that title."
The only way to use this "add new" feature at the moment is to have an optional field (not always desireable) AND either get a match on the node title being referenced, OR then clear the field of text used to try and find a matching node to reference THEN click on the "add new" button (not at all obvious to the user and a serious annoyance).
One possible suggestion is the idea presented in #1148236: Embed referred node edit form as a subform of the referring node form? that could be available and collapsed/hidden and triggered upon not finding a match. This would bypass any issues with the timing of validation and present a much smoother transition to the user.
An additional step towards perfection would be to pass the potential title text on to the node/add form called by the "add new" button. At the moment, the user has to enter what they WANT the current node to connect to, then clear that, then enter it again when they get to the proper form.
Of course, in my use case, the original node is an event, referencing a venue node which is mainly just a single array of Location fields. I have the venue node set to auto_nodetitle itself with the Location (name) field content since that would otherwise be basically a duplication right there, so I would need to set that up to properly pull in the suggested title being passed to it and place it in the Location node field rather than the node title field directly, so having it passed as an easily grabbed argument or a token would be great.
Comment #2
guillaumev commentedsubscribe
Comment #3
Frederic wbase commentedsubscribe
Comment #4
jdufaur commentedsubscribe
Comment #5
robcarrRunning 7.x-1.x-dev...
I have same problem occurring for a required field. At the moment, this issue is a complete usability fail, rendering this module - unfortunately - pretty worthless. It's fundamental to the way this module works, as the D6 equivalent (Node Relationships) got around this problem by using a modal popout to populate the new reference.
I think this module's method of caching the parent form has some benefits, but the concept is pretty flawed for more wider use. Somehow, the child node form needs to be a subform within the parent... either #1148236: Embed referred node edit form as a subform of the referring node form? or implementing modal frames within the D7 modal frame mayhem.
Comment #6
geek-merlinhey, there is a *cure* for these validation issues, called #limit_validation_errors
we have the same issue over at multistep.module, with a patch that shows how to hack it down: #1065458: Required fields in step >1 break multistep
edit: short version: just set '#limit_validation_errors' => array() in your submit element.
Comment #7
geek-merlinok, implemented this together with #1341592: Nodeconnect widget should work also with other widgets
Comment #8
geek-merlinpatches in my sandbox: http://drupal.org/sandbox/axel.rutz/1341736
Comment #9
cntlscrut commentedReviewed and applied suggested changes offered by axel.rutz.
this will address the major issue until a more elegant solution forms.
change applied to 7.x-1.x-dev branch.
Comment #11
hefox commentedThis broke again due to #1359246: Notice: Undefined index: nid in nodeconnect_add_edit_button_submit() according to a comment there, so this needs to be refixed while maintaining the other fix. There is suggestions in the comment left there.