Problem/Motivation

I use canvas override. I have a content type with canvas display. When I edit in canvas I am not able to save with the following error:

Drupal\Core\Entity\EntityStorageException: Update existing 'node' entity revision while changing the revision ID is not supported. in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save()

Steps to reproduce

Proposed resolution

Remaining tasks

  • ✅ File an issue
  • ➖ Addition/Change/Update/Fix
  • ➖ Testing to ensure no regression
  • ➖ Automated unit testing coverage
  • ➖ Automated functional testing coverage
  • ➖ UX/UI designer responsibilities
  • ➖ Readability
  • ➖ Accessibility
  • ➖ Performance
  • ➖ Security
  • ➖ Documentation
  • ➖ Code review by maintainers
  • ➖ Full testing and approval
  • ➖ Credit contributors
  • ➖ Review with the product owner
  • ➖ Release notes snippet
  • ✅ Release

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

eric heydrich created an issue. See original summary.

rajab natshah’s picture

Thanks, Eric for reporting
Have you added the patch? listed in
https://www.drupal.org/project/canvas_override

eric heydrich’s picture

Hi, yes I've used the new patch and have the current Canvas Version installed.

rajab natshah’s picture

Got that. Thanks for the follow up info.
1- What is the version of the Canvas module you are using? 1.3.3 ?
2- Is the full content view mode using Canvas?
3- Are you testing with Drupal CMS? or only Drupal Core?

Try to add the patch before installing the Canvas Override module.
Test to uninstall it then install it ( Do that in a local DDEV if you can )

Steps to reproduce will help a lot in having a fix for this issue.

eric heydrich’s picture

1. I'm using version 1.3.3 of canvas.
2. The Full Content View Mode is having the canvas layout field active.
3. I use it on a website based on Drupal Core.

I uninstalled canvas override and reinstalled. The error's still there.

Here's a stack trace. Maybe this brings some more insights:

#0 /web/core/lib/Drupal/Core/Entity/EntityBase.php(370): Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object(Drupal\node\Entity\Node))
#1 /web/modules/contrib/canvas/src/Controller/ApiAutoSaveController.php(366): Drupal\Core\Entity\EntityBase->save()
#2 [internal function]: Drupal\canvas\Controller\ApiAutoSaveController->post(Object(Symfony\Component\HttpFoundation\Request))
#3 /web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#4 /web/core/lib/Drupal/Core/Render/Renderer.php(634): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->{closure:Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::wrapControllerExecutionInRenderContext():121}()
#5 [internal function]: Drupal\Core\Render\Renderer::{closure:Drupal\Core\Render\Renderer::executeInRenderContext():634}()
#6 /web/core/lib/Drupal/Core/Render/Renderer.php(649): Fiber->resume()
#7 /web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#8 /web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#9 /vendor/symfony/http-kernel/HttpKernel.php(183): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->{closure:Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::onController():96}()
#10 /vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#11 /web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#12 /web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#13 /web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#14 /web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#15 /web/core/modules/page_cache/src/StackMiddleware/PageCache.php(118): Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#16 /web/core/modules/page_cache/src/StackMiddleware/PageCache.php(92): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#17 /web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#18 /web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 /web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(53): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 /web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(54): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#21 /web/core/lib/Drupal/Core/DrupalKernel.php(745): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#22 /web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#23 {main}
arnalyse’s picture

I've ran into the same issue.

My info is:
1. Canvas version 1.4.0
2. Full Content View Mode is having the canvas layout field active/visible.
3. Drupal Core, not CMS

I've extended the fields that should not be restored, which circumvents the error.
But I'm not sure if this is the way to go.

rajab natshah’s picture

Thanks, Arne for the patch
I see, I had been working with Drupal CMS not Drupal Core.

Hoping for MR

rajab natshah’s picture

Status: Active » Needs review
eric heydrich’s picture

Thank you, patch #6 works like charm. Tested against canvas 1.5.0 now.

rajab natshah’s picture

Assigned: Unassigned » rajab natshah

rajab natshah’s picture

Title: Can't save canvas and node » Don't restore entity key or revision metadata fields on save
rajab natshah’s picture

Assigned: rajab natshah » Unassigned
rajab natshah’s picture

  • rajab natshah committed d7aaa8ae on 1.0.x
    fix: #3586587 Don't restore entity key or revision metadata fields on...
rajab natshah’s picture

Assigned: Unassigned » josebc
rajab natshah’s picture

Assigned: josebc » mohammed j. razem
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

rajab natshah’s picture

Issue summary: View changes

Status: Fixed » Closed (fixed)

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