diff --git a/lib/TemplateManager.php b/lib/TemplateManager.php index 3e63c1d9c0..9d148127e8 100644 --- a/lib/TemplateManager.php +++ b/lib/TemplateManager.php @@ -478,7 +478,7 @@ public function formatNodeReturn(File $template) { 'preview' => $this->urlGenerator->linkToRouteAbsolute('richdocuments.templates.getPreview', ['fileId' => $template->getId()]), 'type' => $this->flipTypes()[$template->getMimeType()], 'delete' => $this->urlGenerator->linkToRouteAbsolute('richdocuments.templates.delete', ['fileId' => $template->getId()]), - 'extension' => $template->getExtension(), + 'extension' => ($ooxml && isset(self::TYPE_EXTENSION_OOXML[$documentType])) ? self::TYPE_EXTENSION_OOXML[$documentType] : self::TYPE_EXTENTION[$documentType], ]; }