Append to #prefix and #suffix instead of overwrite

cYu - March 10, 2009 - 19:03
Project:Popups: Add and Reference
Version:6.x-2.0-alpha1
Component:Code
Category:bug report
Priority:minor
Assigned:starbow
Status:needs review
Description

In case other modules are altering the #prefix and #suffix of an element, this patch will concatenate the needed divs.

AttachmentSize
prefix_suffix.patch1.09 KB

#1

starbow - March 10, 2009 - 22:59
Assigned to:Anonymous» starbow

Seems like a good idea.

#2

e2thex - March 23, 2009 - 15:16

I think this might correct http://drupal.org/node/388458

#3

starbow - March 23, 2009 - 18:30

Drat, I should have rolled this into 1.0. I will aim to get it into 1.1

#4

cYu - March 27, 2009 - 13:55
Status:needs review» duplicate

This is rolled into a different patch #388406: multiple values nodereference field

#5

cYu - March 30, 2009 - 20:38
Status:duplicate» needs review

Un-duping with hopes that this simple patch can get in without the other code involved with the issue this was originally considered a dupe of. See http://drupal.org/node/388406#comment-1418308

#6

cYu - May 19, 2009 - 13:35
Category:feature request» bug report

Marking as a bug since 2 different issues report that this may fix existing problems.

#7

greg.harvey - May 19, 2009 - 17:49

Just tried the patch posted here:
http://drupal.org/node/388406#comment-1603308

Didn't work. =(

The "Add another item" button worked, but the "Add New: Content Type" link vanished. Doh!

#8

greg.harvey - May 20, 2009 - 14:24
Status:needs review» reviewed & tested by the community

Correction, that patch *did* work. =)

It's practically identical to the one in this issue as well. Someone might want to review both before deciding which "style" to include. But anyway, works.

My problem was a different bug. If you use a view to populate your CCK node reference field instead of the default mechanism then the "add content type" link won't appear - I had this issue and it threw me off.

So for now, reviewed and tested by at least one person! Is this already in the dev snapshot because of another patch? Is someone somewhere else killing kittens?? =P

#9

ezra-g - May 31, 2009 - 04:58

Patch no longer applied to 6.x-2.0 release. Here it is re-rolled.

AttachmentSize
397614.patch 1.01 KB

#10

cYu - June 1, 2009 - 13:24
Status:reviewed & tested by the community» needs work

The re-rolled patch is missing the concat for #prefix.

#11

cYu - June 11, 2009 - 15:16
Version:6.x-1.x-dev» 6.x-2.0-alpha1
Status:needs work» reviewed & tested by the community

Here is a re-rolled patch for the 2 branch.

AttachmentSize
prefix_suffix.patch 1.1 KB

#12

starbow - June 25, 2009 - 22:49

@cYu: thanks for the patch
I am going though my patch list and putting the patches to review in an external todo list, so hopefully I will be keepting track of things better (fingers crossed :)

#13

taz88ny - September 24, 2009 - 19:31
Status:reviewed & tested by the community» needs review

The current patch appends to prefix and suffix instead of overwriting, but the "Add New..." link disappears when clicking on the "Add another item" button for node reference fields.

I've attached a patch that fixes that by adding the popup wrapper before the prefix, and adding the "Add New..." link after the suffix. The will allow the node reference form to rebuild and not remove the "Add New..." link.

- Luis

AttachmentSize
patch_397614.patch 996 bytes
 
 

Drupal is a registered trademark of Dries Buytaert.