Skip Frontend Editing on previews of not-yet-existing entities

Created on 23 December 2023, 9 months ago
Updated 12 January 2024, 8 months ago
  1. /en/node/template from here I click the quick clone option (create content from this template)
  2. I arrive to the /en/clone/180/quick_clone url
  3. press the Preview option first
  4. and I see this fatal error:
Symfony\Component\Routing\Exception\InvalidParameterException: Parameter "entity_id" for route "frontend_editing.update_content" must match "[^/]++" ("" given) to generate a corresponding URL. in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 209 of core/lib/Drupal/Core/Routing/UrlGenerator.php).
Drupal\Core\Routing\UrlGenerator->getInternalPathFromRoute('frontend_editing.update_content', Object, Array, Array) (Line: 300)
Drupal\Core\Routing\UrlGenerator->generateFromRoute('frontend_editing.update_content', Array, Array, 1) (Line: 108)
Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute('frontend_editing.update_content', Array, Array, 1) (Line: 765)
Drupal\Core\Url->toString(1) (Line: 183)
Drupal\Core\Utility\LinkGenerator->generate(Object, Object) (Line: 95)
Drupal\Core\Render\Element\Link::preRenderLink(Array)
call_user_func_array(Array, Array) (Line: 111)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725', 'exception', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 797)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 386)

if I click on the Save button on the 2. step first, it is saved the node.

when I come back to edit and click on preview, it is show my node

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024