# Error when generating a new odt extension file for a task: "Error: Failed to write in temp directory"

**URL:** <https://www.dolibarr.org/forum/t/error-when-generating-a-new-odt-extension-file-for-a-task-error-failed-to-write-in-temp-directory/21239>\
**Category:** Maintaining my Dolibarr\
**Created:** [September 25, 2021, 7:56pm UTC](https://www.dolibarr.org/forum/t/error-when-generating-a-new-odt-extension-file-for-a-task-error-failed-to-write-in-temp-directory/21239 "2021-09-25T19:56:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![schpitz](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/schpitz/32/4566_2.png) [@schpitz](https://www.dolibarr.org/forum/u/schpitz)\
**Post date:** [September 25, 2021, 7:56pm UTC](https://www.dolibarr.org/forum/t/error-when-generating-a-new-odt-extension-file-for-a-task-error-failed-to-write-in-temp-directory/21239/1 "2021-09-25T19:56:12Z")

</div>

Hi. I’m new here and grateful for the excellent work.

When generating a new ODT extension file for a task, I saw the following error in version 14.0.0.0:

> Message: Error generating document for CommonObject. Error: Failed to write in temp directory

I fixed this on line 527 of the oc\_generic\_task\_odt.modules.php file by replacing this:

`if (!is_writable($conf->task->dir_temp)) {`

by the following syntax:

`if (!is_writable($conf->projet->dir_temp)) {`

Sorry if this is the inappropriate place to discuss, however, I believe it’s a tip that can help people with low programming knowledge like me.

If anyone knows how, please include this fix in some developer’s to-do list.

(ps. and sorry for my bad english kkk)

o/
