Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 CreditAttribution: 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 CreditAttribution: markus_petrux commentedhmm... how about this?
Edit noderelationships.pages.inc and apply this mini-patch:
Comment #3
snorkers CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: markus_petrux commentedCommitted to CVS (patch). Thanks for reporting and testing (so quickly too). :)
Comment #7
jday CreditAttribution: 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])