Closed (fixed)
Project:
Node Relationships
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 Aug 2009 at 19:05 UTC
Updated:
7 Nov 2011 at 15:30 UTC
This is an incredible module and so gald to have stumbled across it a few days ago.
However, when I create and reference a node, when I return from my modal page, I have 'ant [nid:1234]' in my text box - ie, the correct new NID, but the 'ant' text prefix. Many of my text/autocomplete woes have been down to Devel, but disabling this had no effect.
Any thoughts?
Comments
Comment #1
markus_petrux commentedYep! This is because you're probably using Automatic Node Titles (ANT), and "Create and reference" is reading the title of the node from the form, but ANT generates the title later. Anyway, I think you can still submit the node form, and the correct node reference will be taken.
I need to think about a workaround here, so that we can still show the correct title somehow.
PS: Better issue title a switching to f.r.
Comment #2
markus_petrux commentedhmm... how about this?
Edit noderelationships.pages.inc and apply this mini-patch:
Comment #3
snorkers commentedThat's exactly it...! I had forgotten I'd set up the related node type to use Auto Node Title. Your little patch works fine... haven't tried it it yet on a non-ANT content type, but will try it soonest.
Thanks for looking into it so quickly.
Comment #4
markus_petrux commentedWhen this submit handler is invoked, node_save() has already been executed, so if this mini-patch works it should cover ANT and any other module that alters node data during nodeapi('presave'), nodeapi('save'), etc. :)
Will commit this asap.
Comment #5
markus_petrux commentedCommitted to CVS (patch). Thanks for reporting and testing (so quickly too). :)
Comment #7
jday commentedwhen using the 'create and reference' link the new referenced node does not have the automatic node title but the token field names instead ([field_first_name-raw] [field_last_name-raw] [nid:388913])