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.
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"
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
Template to Export: DOCX
-
- Posts: 227
- Joined: 24 Sep 2018, 23:22
- Name: Stuart B
- Location: Manchester UK
- support
- Site Admin
- Posts: 6222
- Joined: 19 Oct 2014, 18:22
- Name: Sergey Kharchishin
- Location: Russia, Evpatoriya
Re: Template to Export: DOCX
Make sure you have folder uploads\templates\ and it's writable.
-
- Posts: 227
- Joined: 24 Sep 2018, 23:22
- Name: Stuart B
- Location: Manchester UK
Re: Template to Export: DOCX
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
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
- support
- Site Admin
- Posts: 6222
- Joined: 19 Oct 2014, 18:22
- Name: Sergey Kharchishin
- Location: Russia, Evpatoriya
Re: Template to Export: DOCX
Default php dir on your server is not configured or not writable https://www.php.net/manual/en/function. ... mp-dir.php
See https://github.com/PHPOffice/PHPWord/issues/809
https://github.com/PHPOffice/PHPWord/issues/310
See https://github.com/PHPOffice/PHPWord/issues/809
https://github.com/PHPOffice/PHPWord/issues/310