Closed (fixed)
Project:
Node Reference URL Widget
Version:
7.x-1.11
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 May 2011 at 20:07 UTC
Updated:
7 Oct 2011 at 22:41 UTC
Jump to comment: Most recent file
Comments
Comment #1
Adam S commentedIn function theme_textfield() in includes/form.inc line 3633 the autocomplete path was not validating with drupal_valid_path.
I changed the node_reference_field_widget_form function to reflect the autocomplete text widget in the node_reference module of References by adding
. $field['field_name']The form field widget now worked but wasn't returning any results. I stepped through the code but can't understand the query of _node_reference_potential_references_standard($field, $options) in the node_reference.module line 746.
Knowing that this is beyond me I cleared the cache, then I cleared the cache again, then just cleared the menu cache, then the whole cached to make sure.
Well, I tested the using the autocomplete textfield and returned to the node reference URL widget which oddly enough works just fine. Cleared the cache -- mostly out of habit -- and it still works.
I don't know what the problem is. I hope this information helps solve it.
Comment #2
notasheep commented+1
I'm trying to use this in conjunction with Unique Field module, but without this module correctly falling back to the autocomplete widget upon node edit, the two do not work together.
Comment #3
elly commented+1 I'm getting the same behavior (plain text box), though it seemed the autocomplete fallback field did work when first added, but now after moving the node forms around (into custom ctools panels content types), it has stopped working anywhere, even on the default node/add form.
Comment #4
elly commentedbueller?
Comment #5
SharkMachine commentedIt seems that autocomplete_match isn't set and that's why it doesn't return anything after making the change in post #1.
I got it working by adding it to the widget settings, making the nodereference_url_widget_info -function look like this:
Comment #6
droath commentedI made the changes that both post #1 and #5 suggested, and it looks like that solved the problem. I also added some code to the "nodereference_url_field_widget_settings_form" function so we can expose additional autocomplete matching options.
Comment #7
droath commentedComment #8
Matthew Davidson commentedMinor tidying up. Made patch relative to module directory, removed some trailing whitespace. Works for me. Thanks @droath.
Comment #9
bforchhammer commented#8 solves the problem for me as well.
Comment #10
quicksketchExcellent, thanks everyone! Sometimes it's hard keeping up with the References folks. :)
Committed to the 7.x branch. Thanks!