Terms and conditions of sale on PDF settings doesn't upload

I’m trying to use the upload a PDF that contains terms of sale, but nothing happens, it used to work before but not anymore, the PDF name shows on the upload field but once I click save it disappears.

Hi @absml

Did you change something recently, or did you install any custom module recently? Check the Dolibarr log once.

Thanks
Saikat Koley
Software Developer
Call/WhatsApp : +919903256573
https://www.linkedin.com/in/saikatkoley/

1 Like

no I didn’t change anything or install any mods

1 Like

Then check the Dolibarr log once.

::1 - - [26/Oct/2025:08:30:29 +0100] "GET /dolibarr/index.php?mainmenu=home&leftmenu=home HTTP/1.1" 200 179232
::1 - - [26/Oct/2025:08:30:31 +0100] "GET /dolibarr/admin/index.php?mainmenu=home&leftmenu=setup HTTP/1.1" 200 41655
::1 - - [26/Oct/2025:08:30:33 +0100] "GET /dolibarr/admin/pdf.php?mainmenu=home HTTP/1.1" 200 139756
::1 - - [26/Oct/2025:08:30:35 +0100] "GET /dolibarr/admin/pdf_other.php HTTP/1.1" 200 69871
::1 - - [26/Oct/2025:08:30:41 +0100] "POST /dolibarr/admin/pdf_other.php HTTP/1.1" 302 -
::1 - - [26/Oct/2025:08:30:42 +0100] "GET /dolibarr/admin/pdf_other.php?mainmenu=home&leftmenu=setup HTTP/1.1" 200 70302

I don’t think that is the dolibarr log, it looks something like this and it is usually in the documents folder.

2025-10-24 09:45:49 DEBUG   192.168.127.1       436     33 User::fetch user not found
2025-10-24 09:45:49 NOTICE  192.168.127.1       436     33 functions_isallowed::check_user_api_key Authentication KO for 'jbendtsen': Failed to fetch on entity
2025-10-24 09:45:50 INFO    192.168.127.1       436     33 --- End access to /api/index.php/setup/modules/status/all
2025-10-24 09:45:53 NOTICE  192.168.127.1        56     33 --- Access to GET /api/index.php/warehouses/1/products - action=, massaction= NOTOKENRENEWAL=1
2025-10-24 09:45:53 DEBUG   192.168.127.1        56     33 sql=SELECT transkey, transvalue FROM llx_overwrite_trans where (lang='en_DK' OR lang IS NULL) AND entity IN (0, 0,1) ORDER BY lang DESC
2025-10-24 09:45:53 INFO    192.168.127.1        56     33 Load a dedicated API file moduleobject=warehouses moduledirforclass=product/stock

you might need to set the log level to DEBUG to see all the data.

Sorry I just enabled the debug logs module, is this the right log?

2025-10-27 07:42:04 DEBUG   ::1                5800        sql=SELECT DISTINCT r.module, r.perms, r.subperms, r.entity FROM llx_usergroup_rights as gr, llx_usergroup_user as gu, llx_rights_def as r WHERE r.id = gr.fk_id AND gr.entity = 1 AND gu.entity IN (0,1) AND r.entity = 1 AND gr.fk_usergroup = gu.fk_usergroup AND gu.fk_user = 1 AND r.perms IS NOT NULL AND r.perms NOT LIKE '%_advance'
2025-10-27 07:42:04 DEBUG   ::1                5800        --- Access to GET /dolibarr/admin/pdf_other.php - action=, massaction=
2025-10-27 07:42:04 DEBUG   ::1                5800        sql=SELECT transkey, transvalue FROM llx_overwrite_trans where (lang='fr_FR' OR lang IS NULL) AND entity IN (0, 0,1) ORDER BY lang DESC
2025-10-27 07:42:04 DEBUG   ::1                5800        sql=SELECT m.rowid, m.type, m.module, m.fk_menu, m.fk_mainmenu, m.fk_leftmenu, m.url, m.titre, m.prefix, m.langs, m.perms, m.enabled, m.target, m.mainmenu, m.leftmenu, m.position FROM llx_menu as m WHERE m.entity IN (0,1) AND m.menu_handler IN ('eldy','all') AND m.usertype IN (0,2) ORDER BY m.type DESC, m.position, m.rowid
2025-10-27 07:42:04 DEBUG   ::1                5800        sql=SELECT t.localtax1, t.localtax2 FROM llx_c_tva as t, llx_c_country as c WHERE t.fk_pays = c.rowid AND c.code = 'DZ' AND t.active = 1 AND t.entity IN (1) AND t.localtax1_type <> '0'
2025-10-27 07:42:04 DEBUG   ::1                5800        sql=SELECT t.localtax1, t.localtax2 FROM llx_c_tva as t, llx_c_country as c WHERE t.fk_pays = c.rowid AND c.code = 'DZ' AND t.active = 1 AND t.entity IN (1) AND t.localtax2_type <> '0'
2025-10-27 07:42:04 DEBUG   ::1                5800        sql=SELECT t.localtax1, t.localtax2 FROM llx_c_tva as t, llx_c_country as c WHERE t.fk_pays = c.rowid AND c.code = 'DZ' AND t.active = 1 AND t.entity IN (1) AND t.localtax1_type <> '0'
2025-10-27 07:42:04 DEBUG   ::1                5800        sql=SELECT t.localtax1, t.localtax2 FROM llx_c_tva as t, llx_c_country as c WHERE t.fk_pays = c.rowid AND c.code = 'DZ' AND t.active = 1 AND t.entity IN (1) AND t.localtax2_type <> '0'
2025-10-27 07:42:05 DEBUG   ::1                5800        --- End access to /dolibarr/admin/pdf_other.php

it is the right log, but I don’t see the POST, only a GET

That’s the thing, I even tried to upload again and check the logs but I get the same result

@absml

Now check the PHP log once. I hope you will get some clue there.

Saikat Koley
Software Developer
Call/WhatsApp : +919903256573
https://www.linkedin.com/in/saikatkoley/

2025-10-28 09:47:11 DEBUG   ::1                5800        --- Access to POST /dolibarr/admin/pdf_other.php - action=update, massaction=
2025-10-28 09:47:11 DEBUG   ::1                5800        sql=SELECT transkey, transvalue FROM llx_overwrite_trans where (lang='en_GB' OR lang IS NULL) AND entity IN (0, 0,1) ORDER BY lang DESC
2025-10-28 09:47:11 DEBUG   ::1                5800        sql=SELECT m.rowid, m.type, m.module, m.fk_menu, m.fk_mainmenu, m.fk_leftmenu, m.url, m.titre, m.prefix, m.langs, m.perms, m.enabled, m.target, m.mainmenu, m.leftmenu, m.position FROM llx_menu as m WHERE m.entity IN (0,1) AND m.menu_handler IN ('eldy','all') AND m.usertype IN (0,2) ORDER BY m.type DESC, m.position, m.rowid

Files.lib::dol_move_uploaded_file Dir c:/dolibarr/dolibarr_documents/mycompany is not writable. Return 'ErrorDirNotWritable'

It says directory not writable, I check documents folder and it’s not on read only

@absml

So, you’ve got your answer, it’s a permission issue. The folder doesn’t have the proper write permissions, which is why you’re unable to upload anything to it.

Saikat Koley
Software Developer
Call/WhatsApp : +919903256573
https://www.linkedin.com/in/saikatkoley/

But the folder is good, it wasn’t on read only, I even checked the subfolder and it had the correct permission.

@absml read/writeable for which user? try as the user running the database

The user is SYSTEM, I checked the permissions in the folder properties and it’s set to full control. I checked the path in the config file. Restarted the PC and the server but still nothing. Same error. In the security option in Dolibarr under upload it also fails when I tried to test it there, always same error.

@absml I still claim just like saikatkoley that it is a permission issue

It is for sure but I’ve tried everything and it didn’t work somehow. I’ll keep trying, if I found a solution I’ll post an update. Thank you everyone for the help.

Update:

I tried just creating a new folder instead of the original folder “mycompany”, I gave it the same name and it worked. And I uploaded the logo again.

Hope this helps in the future if someone has the same issue.