Hi starbow,
(by request, new issue below from #6 in #308589: Autofill base form NodeReference field on popup close).

Is it possible to just see the created node in the node-reference list after popup node creation?

Here's what happens for me:
* I click 'Add new' link
* Node is added (yay!)
* Modal redirects to create content, which I want to close
* After closing the popup, my newly created node does not appear in the node-reference field. I have a multi-select.

Is this by design? I assume it isn't because it kid of defeats the purpose of add & reference. Kind of only 'add' but can't reference :(

I tried with 6.x.1.x-dev and 6.x0-1.0-beta1, with similar results (the only difference is, in the dev snapshot the create content window is not called, but another node of the same type we're originally in... the parent node containing the node-reference). So i'm guessing it's not the version - maybe something with my configurations?

I'm hoping to find out what I must be doing wrong though, because this module would really solve a lot of my dilemmas ;)

Comments

sprugman’s picture

This is a necessity for me, as well. Is there a plan to implement it?

A module that allowed for inline adding of references, with a clean interface would solve a major pain point for a lot of may projects, since nearly all of them have some kind of reference. This seems like the start of it, but from the bug list, doesn't quite seem to completely solve the issue. (I'd like to see the same functionality for user references in CCK types, as well -- i.e. the ability to add users inline.)

starbow’s picture

Thanks, I will do some testing.

@World at large: Is everyone having this issue, or only some people?

rmassamiri’s picture

I also think this would be a great added piece of functionality for the user interface. Thank you.

starbow’s picture

Status: Active » Postponed (maintainer needs more info)

scottrigby: Please give beta2 a try. What should happen, that that after you submit the popup node form, you should get a popup window that says "Page X has been created." If you see the node creation form popup again, it means that the form submission did not pass validation.

BTW, be sure to actually click the "Save" button, rather than hitting the enter key to submit the form.

laken’s picture

I just installed 5.x-1.0-beta1 and am finding the same bug - here's what happens for me:

- click the "add new" link in base form
- popup appears with node add form
- I fill out form and click "Submit"
- modal window stays up, and in it I get a fresh node add form, with the status message "Your Story has been created" at the top. I do not get separate popup window with the success message.
- if I close the modal, the drop-down list on the base form does not contain the newly added node as an option.

At the same time, the form did pass validation, because the new node has indeed been added. Is there a fix to this that found its way into 6.x-1.x-beta2 and didn't get applied to the D5 branch?

laken’s picture

I'm wondering if anyone can verify that 6--1-0-BETA2 actually fixes this? I tried backporting the changes in that version (fix for content types with '_'s in them) to 5.x-1.0-beta1, but no luck.

After spending a huge amount of time trying other solutions for add and reference, I feel this module is so superior - if we can just get this issue ironed out my client and I will be very happy!

laken’s picture

Small addition to problem description:

Let's say my base node type is Employee, and the node-reference is to type Supervisor.

After I invoke the pop-up "Add Supervisor", fill out, and submit the form, the pop-up disappears and I see the "loading" animation for a few seconds. Then a new pop-up appears with success message "Your Supervisor has been created", but this new popup is a blank Employee add form - which I was in the middle of filling out on the base page.

From #4 I take it the expected behavior is a small modal notification window with the success message and an OK button - when dismissed this should return to the original form, with the new referenced node inserted as an option into the select list.

I have been through the code a few times but my AJAX/AHAH understanding is not there yet - I can't find where it's modifying the select element in the base form to insert the option for the new node.

I can confirm this is working in the D6 beta 2 version - should I open a separate issue for the D5 version?

starbow’s picture

Status: Postponed (maintainer needs more info) » Fixed

@alaken, yeah, please open up a new issue for this. I am going to make this as closed for the D6 version.

laken’s picture

Thanks starbow - new issue opened at #345353: Created node not added to node-reference list after popup node creation. (not sure why I didn't get an email notification of your post - must investigate...)

laken’s picture

Version: 6.x-1.0-beta2 » 6.x-1.x-dev

(sorry, dupe comment)

Status: Fixed » Closed (fixed)

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

gmark’s picture

Version: 6.x-1.x-dev » 6.x-1.0-beta2
Status: Closed (fixed) » Active

I can confirm that this behavior is still occurring on 6.x-1.0-beta2, as well as the latest 6.x-1.x-dev (Jan 19). The node is created, but it is not added to the nodereference field.

starbow’s picture

gmark - I recommend opening a new issue, and providing a description of your setup (how you are using node reference, what modules you have enabled that are used on the node creation page, etc).

gmark’s picture

Status: Active » Fixed

After further testing, it seems that this is indeed working. Because I was using an autocomplete text field, I didn't see any change in the field after adding the popup node, and assumed that it wasn't working. Expected behavior was to see the new node display in the text field automatically. But indeed the node is available if you type it in.

My issue would appear to be covered in #308589: Autofill base form NodeReference field on popup close. Switching this back to fixed.

Thank you!

Version: 6.x-1.x-dev » 6.x-1.0-beta2
Status: Fixed » Closed (fixed)

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