Redactor does not recognise TV in uploadpath

Hi,
Hi im using redactor 2.2.0 the following happens;
I have an redactor.image_upload_path defined of images/[[+year]]/[[+tv.redactorpath]]. The TV redactorpath is set to @INHERIT so all children pages automatically get the right redactorpath value. the editor_user never needs to see this TV.
Now when an administrator inserts an image, the file gets correctly uploaded to ‘images/2016/gekozensectie/myimage.jpg’. BUT when my client tries to upload an image the TV redactorpath is NOT parsed. So the path to the image is ‘images/2016/[[+tv.redactorpath]]/myimage.jpg’ or ‘images/2016//myimage.jpg’? On the server there is a folder ‘[[+tv.redactorpath]]’ and the uploaded image is in there but it shows up as a broken link

The difference between me and my client is that she has is in a usergroup/ACL that does not have rights to modify the TV (redactorpath). it is in a usergroup that only administators can acces/see

So it seems the TV is not parsed in the upload path when the user has no rights to modify that TV. Which is silly.
Anyone know how to fix this?

RDG

I’ve just replied to your support ticket with a solution/workaround (form customisation instead of ACLs); sorry it took so long to get back to you on that.

I noticed same issue, if resource (new resource) is not saved before adding the Image. After save it works.

Thanks man. it works ok now.
Please file a bug report about the ACL’s i agree with you this is not logical :slight_smile:
RDG

Unfortunately there’s not much we can do about that @mtalvenheimo; if the resource isn’t saved yet we don’t have the TV value available to insert into the path.

You could add a warning popup stating proper upload can only happen when the page is saved?
RDG

You could add a warning popup stating proper upload can only happen when the page is saved?

That could be one solution. Or is it somehow possible to disable “Insert file” button before the document is saved?

Usually users will add files before saving the document, so i have to figure something :slight_smile: