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.
menu_node_submit()
calls entity_create()
when $form_state['values']['menu']
is empty which results in the following message appearing:
Warning: Invalid argument supplied for foreach() in Drupal\Core\Entity\Entity->__construct() (line 72 of core/lib/Drupal/Core/Entity/Entity.php).
Comment | File | Size | Author |
---|---|---|---|
#16 | node-dependency-1986000-16.patch | 563 bytes | Berdir |
#10 | missing-menu-fatal-error-1986000-10-test-only.patch | 2.12 KB | Berdir |
#10 | missing-menu-fatal-error-1986000-10.patch | 3.31 KB | Berdir |
#3 | 1986000-3.patch | 1.19 KB | alphawebgroup |
Comments
Comment #1
benjy CreditAttribution: benjy commentedCan you provide the steps to reproduce against the latest head. I'm unable to replicate by adding menu links, or content with menu entries.
Comment #2
idflood CreditAttribution: idflood commentedI've found the same issue. Here are the steps to reproduce:
edit: here is some relevant lines of the backtrace
Comment #2.0
idflood CreditAttribution: idflood commentedAdded code tags
Comment #3
alphawebgroupComment #4
alphawebgroupComment #6
alphawebgroup3: 1986000-3.patch queued for re-testing.
Comment #7
Blooniverse CreditAttribution: Blooniverse commented#3: 1986000-3.patch works, for me. Thanks for the work!
Changing status to RTBC.
Comment #8
xjm3: 1986000-3.patch queued for re-testing.
Comment #9
webchickNice catch! Let's get an automated test added for this.
Comment #10
BerdirThis is now a recoverable fatal error that prevents creating nodes with that configuration, so raising to major.
Attached patch adds tests and as a bonus, converts MenuNodeTest to not use the standard profile which means that the test is now ~3 times faster :)
Comment #11
BerdirUhm. The other major ;)
Comment #12
Dragan Eror CreditAttribution: Dragan Eror commentedTested patch from #10, works nice.
Thanks Berdir
Comment #14
BerdirHad the test only patch in the wrong order, this passed/failed as expected.
Comment #15
catchCommitted/pushed to 8.x, thanks!
Comment #16
BerdirOk, bad timing, this conflicted with https://drupal.org/node/1541298 and needs an exlicit dependency on node now.
Comment #17
alexpottCommitted 21fca46 and pushed to 8.x. Thanks!