Problem/Motivation
Steps to reproduce
- On a Standard installation go to Add content » Article and fill in a title
- Click the Provide a menu link checkbox in the Menu settings details (in the sidebar).
- Click Preview on the bottom of the page.
Expected result
You see a preview of the node (with or without a menu link).
Actual result
Drupal\Core\Entity\EntityStorageException: The entity URI "entity:node/" is invalid. You must specify the entity id in the URL. e.g., entity:node/1 for loading the canonical path to node entity with id 1. in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 929 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
Drupal\Core\Url::fromUri('entity:node/')
- Drupal\link\Plugin\Field\FieldType\LinkItem->getUrl()
- Drupal\menu_link_content\Entity\MenuLinkContent->getUrlObject()
- Drupal\menu_link_content\Entity\MenuLinkContent->getPluginDefinition()
- Drupal\menu_link_content\Entity\MenuLinkContent->postSave(Object, )
- Drupal\Core\Entity\EntityStorageBase->save(Object)
- Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object)
- Drupal\Core\Entity\Entity->save()
- _menu_ui_node_save(Object, Array)
- menu_ui_form_node_form_submit(Array, Object)
- call_user_func_array('menu_ui_form_node_form_submit', Array)
- Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object)
- Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object)
- Drupal\Core\Form\FormBuilder->processForm('node_article_form', Array, Object)
- Drupal\Core\Form\FormBuilder->buildForm(Object, Object)
- Drupal\Core\Entity\EntityFormBuilder->getForm(Object)
- Drupal\node\Controller\NodeController->add(Object)
...
Proposed resolution
Remaining tasks
User interface changes
API changes
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | menu-ui-preview-2475805-7.patch | 1.53 KB | tstoeckler |
Comments
Comment #1
tstoecklerComment #2
xjmPer https://www.drupal.org/core/issue-priority#critical-bug, critical bugs are those that:
This does not render Drupal (or the node system) unusable, and I guess the workarounds would be to enter the menu after previewing or saving. Nasty though, so definitely a major bug. Thanks @tstoeckler for finding this!
Comment #3
tstoecklerWow, sorry but this is really getting ridiculous. I won't play priority ping pong, but if this is not critical, then we might as well just release 8.0.0 today. Please name one critical that makes Drupal more unusable than this.
Comment #4
webwarrior commentedPossible solution.
Comment #5
tstoecklerWorks for me, thanks!
Comment #6
webchickLet's get some tests to ensure this doesn't happen again.
Comment #7
googletorp commentedAdded a test case for this.
Fails without the patch and passes with the patch from #4.
Comment #8
tstoecklerUploading a tests-only patch.
Comment #9
tstoecklerAnd the original patch again, so it's the last one.
Marking RTBC, assuming the tests come back red and green as expected.
Thanks @googletorp for adding the test!
Comment #11
xjmThanks for the test-only patch to expose the failure. This issue addresses a major bug and is prioritized per https://www.drupal.org/core/beta-changes. Committed and pushed to 8.0.x.
Removed an non-standard comma on commit: