Bit of an edge case here, but I was trying to set up a mechanism where a references dialog form would have field values prepopulated from data contained in the parent form (potentially unsubmitted data hence would need to be done via javascript).

I wrote a behaviour that appended a query string to the 'add [node type]' href attribute, but unfortunately, the code in Drupal.ReferencesDialog.open appends it's own query string without checking for a pre-existing one.

I've put together a patch (attached), but this is the first patch I've ever submitted so apologies if I've done it horribly wrong.

Thanks,
Paul.

CommentFileSizeAuthor
patch.diff793 bytesPQ
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

BrankoC’s picture

Shouldn't this be labelled a bug report if it fixes a bug?

PQ’s picture

I wasn't sure, I thought I might be presenting a new use case, and so feature seems appropriate, but if the maintainers feels otherwise then this can be changed.

Thanks,
Paul.

BrankoC’s picture

Er, you're right, I only looked at the problem your patch fixed, but your issue is about more than the bug.

fabsor’s picture

Status: Needs review » Fixed

Hi!

This seems OK to me. Commited:
http://drupal.org/commitlog/commit/23918/e4799feebed0fab6dcee3a7bf59d2a6...

Next time you submit a patch, create the patch from the module directory instead of your Drupal root.

PQ’s picture

Thanks Fabsor, I'll bear that in mind next time,
Paul.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.