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

Comments

starbow’s picture

Assigned: Unassigned » starbow

Seems like a good idea.

e2thex’s picture

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

starbow’s picture

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

cyu’s picture

Status: Needs review » Closed (duplicate)

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

cyu’s picture

Status: Closed (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

cyu’s picture

Category: feature » bug

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

greg.harvey’s picture

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!

greg.harvey’s picture

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

ezra-g’s picture

StatusFileSize
new1.01 KB

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

cyu’s picture

Status: Reviewed & tested by the community » Needs work

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

cyu’s picture

Version: 6.x-1.x-dev » 6.x-2.0-alpha1
Status: Needs work » Reviewed & tested by the community
StatusFileSize
new1.1 KB

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

starbow’s picture

@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 :)

taz88ny’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new996 bytes

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

_Jay’s picture

Did you get these patches to work? After trying #11 and #13 patches I still can't see "Add New:" link when I put the field in multigroup. Could the problem be with my CCK version? Anyone have this working?

Popups: Add & Reference : 6.x-2.0-alpha1
CCK: 6.x-3.0-alpha3