From 6f5bda676184b321503ac9455b822849ccf3c580 Mon Sep 17 00:00:00 2001 From: Ivo Valchev Date: Tue, 23 Feb 2021 15:36:26 +0100 Subject: [PATCH] Initialise radactor fields when duplicating content --- src/RedactorInjectorWidget.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RedactorInjectorWidget.php b/src/RedactorInjectorWidget.php index 1ee288d..98d44a4 100644 --- a/src/RedactorInjectorWidget.php +++ b/src/RedactorInjectorWidget.php @@ -25,7 +25,7 @@ public function run(array $params = []): ?string { $request = $this->getExtension()->getRequest(); // Only produce output when editing or creating a Record, with GET method. - if (! in_array($request->get('_route'), ['bolt_content_edit', 'bolt_content_new'], true) || + if (! in_array($request->get('_route'), ['bolt_content_edit', 'bolt_content_new', 'bolt_content_duplicate'], true) || ($this->getExtension()->getRequest()->getMethod() !== 'GET')) { return null; }