Submitting a node form (on node save or update) from within an overlay throws this notice:
Notice: Undefined index: rebuild in drupal_build_form() (line 239 of /opt/www/deploy/drupal-7.x-dev/includes/form.inc).
Submitting a node form to Delete a node from within an overlay throws the following two errors (logged separately):
Notice: Undefined index: system_paths in drupal_cache_system_paths() (line 164 of /opt/www/deploy/drupal-7.x-dev/includes/path.inc).
Warning: current(): Passed variable is not an array or object in drupal_cache_system_paths() (line 169 of /opt/www/deploy/drupal-7.x-dev/includes/path.inc).
Due to the nature of the overlay, they can be spotted only briefly in the form render itself after submission but are logged to dblog.
Adding, updating or deleting an article by manually visiting the node form (i.e /node/add/article or /node/2/edit) without the overlay doesn't show these errors, and likewise if Overlay is disabled entirely.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | nodeformrebuild.patch | 671 bytes | casey |
Comments
Comment #1
David_Rothstein commentedI'm also finding that if you try to submit the node by hitting enter in the title field, not only does it throw the error described above, but it also fails to create the node (even though it closes the overlay and acts like the node was created).
Perhaps a separate bug, but for now seems related enough to file it here... and this is critical.
Comment #2
Anonymous (not verified) commentedI can confirm the behaviour in #1 as well, but also that hitting enter on a node form in the title field without Overlay also fails, and simply re-renders the node form with no form error, so it seems like a general problem outside of overlay itself.
Comment #3
alex ua commentedI also encountered this error when I added my first page on a new D7 install
Comment #4
bobmarchman commentedAlso confirming the first error listed.
I, too, encountered this while saving during node add and node edit for both of Drupal 7's default content types (page and article) when using the overlay. On both insert and update, nodes would save and display each time seemingly without error. Without the overlay, the node saved and updated without error. Confirmed with watchdog logs.
Looks like there's some issues to iron out with form caching and node form submission. The undefined index error on node save/edit has something to do with $form['rebuild'] being unset in node_form_submit() and then drupal_build_form() being called after the fact, when $form['rebuild'] is no longer defined. I have to poke around some more to get the exact order of operations to see when this happens, but the fix may lie in either wrapping $form['rebuild'] with an isset() on line 239 of form.inc or by putting a conditional in some where to ensure $form['rebuild'] has SOME value whenever drupal_build_form() is called during the node save/edit process.
Of course, I humbly acknowledge I could be way off base as I'm not nearly as familiar with D7's API as I am with D6. Just throwing out ideas.
As for the node delete errors, I was unable to reproduce those, overlay or no overlay. I'm using the 7.x-dev version released on Dec 18th, so that issue potentially may have been addressed.
Comment #5
sun.core commented$form['rebuild'] simply should not be unset. It is expected to exist at any time, so we just need to set it to FALSE.
Comment #6
casey commentedSo this belongs to the node.module component.
Comment #7
casey commentedStill applies.
Comment #8
casey commentedIt already has been fixed.