Template to Export: DOCX

Post Reply
StuartB_75
Posts: 227
Joined: 24 Sep 2018, 23:22
Name: Stuart B
Location: Manchester UK

Template to Export: DOCX

Post by StuartB_75 »

HI,
I'm trying to create a exported report using the new DOCX feature. I create the *.DOCX file and use the 'Choose File' from within 'Filename' to select and upload it. The filename shows in the Filename input box.
Screen Shot 2020-05-21 at 15.20.46.png
I save the template, but when I return to the template to edit it the filename field has reverted back to 'Choose file: no file selected"
Screen Shot 2020-05-21 at 15.20.46.png
Screen Shot 2020-05-21 at 15.28.51.png
Screen Shot 2020-05-21 at 15.28.51.png (10.21 KiB) Viewed 676 times
Am I missing something or not following the correct sequence?
I understand that there may be a tutorial coming on this topic, but I'm interested to use this feature

Many thanks
Attachments
Screen Shot 2020-05-21 at 15.21.02.png
User avatar
support
Site Admin
Posts: 6222
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Template to Export: DOCX

Post by support »

Make sure you have folder uploads\templates\ and it's writable.
StuartB_75
Posts: 227
Joined: 24 Sep 2018, 23:22
Name: Stuart B
Location: Manchester UK

Re: Template to Export: DOCX

Post by StuartB_75 »

Thanks for the quick reply.
I've made it writeable which has sorted out the uploading problem and now I get some sort of response.
Unfortunately, the respose is this:
Fatal error: Uncaught PhpOffice\PhpWord\Exception\CreateTemporaryFileException: Could not create a temporary file with unique name in the specified directory. in /Applications/XAMPP/xamppfiles/htdocs/rukovoditel_2.7/includes/libs/PHPWord/vendor/phpoffice/phpword/src/PhpWord/TemplateProcessor.php:107 Stack trace: #0 /Applications/XAMPP/xamppfiles/htdocs/rukovoditel_2.7/plugins/ext/classes/templates/export_templates_blocks.php(46): PhpOffice\PhpWord\TemplateProcessor->__construct('uploads/templat...') #1 /Applications/XAMPP/xamppfiles/htdocs/rukovoditel_2.7/modules/items/actions/print_template.php(41): export_templates_blocks->prepare_template_file('30', '442', Array) #2 /Applications/XAMPP/xamppfiles/htdocs/Rukovoditel_2.7/index.php(20): require('/Applications/X...') #3 {main} thrown in /Applications/XAMPP/xamppfiles/htdocs/rukovoditel_2.7/includes/libs/PHPWord/vendor/phpoffice/phpword/src/PhpWord/TemplateProcessor.php on line 107
User avatar
support
Site Admin
Posts: 6222
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Template to Export: DOCX

Post by support »

Post Reply