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.
I have setup everything correctly as far as I can tell - template shows up in the field creation form, and all. When I create a node after submitting the page is empty. The parent node is created successfully, but no child nodes are created.
The parent node is "project" with attached "budget" - there is not a nodereference field to budget, is that necessary? The autocreate nodereference field is called field_budget (machine name). I have made sure there is no weird required fields for budget.
Any help would be appreciated.
Comments
Comment #1
sunset_bill CreditAttribution: sunset_bill commentedDrat, my tests are working as expected.
It sounds like you're checking admin/content/node to see what actually gets created, right? Given the white screen, I suspect things are crashing during node/add before ANR kicks in, so first thing I'd look at is your server error log to see if that gives you any useful clues. Your Drupal logs might help, too, but I'd look at server log first, since that's where you'll see things like PHP or memory allocation errors.
You don't need to add a specific nodereference field for budget, that's what ANR is supposed to do for you.
salud,
SB
Comment #2
pimousse98 CreditAttribution: pimousse98 commentedHi,
Thank you so much for looking into this issue. I checked my error log and there was an issue from a form override that I had on node_form - somehow it would output a "headers already sent" error when using autocreate node reference (but not otherwise). I changed the form override and it removed the error.
On a related note, it turns out I needed something different: I needed, upon creating a node of type A, to create a node of type B with a nodereference field to type A (nodereference autocreate does the opposite, creating a nodereference in A pointing to B).
I ended up using Rules & Actions to do that.
Thanks,
Delphine
Comment #3
pimousse98 CreditAttribution: pimousse98 commentedI'm setting to fixed since the bug came from somewhere else. Thanks!