diff --git a/lib/TemplateManager.php b/lib/TemplateManager.php index 258199ece5..f9f66fb555 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], ]; }