Can't add a new file or document

Good morning !

when I want to add a file here :

this appear :
The file actions_linkedfiles.inc.php was included but paramater $permissiontoadd as not set before.

Need help :sos:

Hi,

Can you try a shorter file name ?

Thanks for replying ,

I’ve tried this file name “Acceuil.png” but it’s not working too :

May be try the update to V15.0.2

Same bug for me. V15.0.2 :frowning:

I tried it from SourceForge but their is only a README file !

Well , finally I found the solution ! thanks for your help @yann.opens :hugs:

:white_check_mark: Solution :
All you need is to to add this : $permissiontoadd = 1 before the
include DOL_DOCUMENT_ROOT.’/core/actions_linkedfiles.inc.php’; .

Hope this can help others with same problem .

Be aware that may lead to unwanted user access. = 1 will allow all users to add files

And what’s the solution for that ?

Normally a user restriction should has been exist but it may me misplaced (like me) and not be $permissiontoadd. But Dolibarr manage “old” system : if $permissiontoadd does not exist, it applies $permtoedit.

In my case, I just moved the code line concerned which is :

$permtoedit = $user->rights->agefodd->creer || $user->rights->agefodd->modifier;

So it’s linked to the module (mine is Agefodd)

Hello,

I can’t find the right file to do this : All you need is to to add this : $permissiontoadd = 1 before the
include DOL_DOCUMENT_ROOT.’/core/actions_linkedfiles.inc.php’; .

Which file is it please ?

Thank you !

Hello,

THis has been corrected, what version do you use ?