Placeholders in image path doesn't work


I’m using Redactor 3.1.2 within MODX 2.8.4
I’m trying to setup the Image Upload Path on Redactor like this :

The image upload path are set as well on the Simple Browser and MODX Browser too.
But it’s doesn’t work : the files are always uploaded to the media source root path instead of the wanted one
I have set the base tag : <base href="[[!++site_url]]" />
And the media source has theses settings :

What’s going wrong ?

Hi @Spheerys :slight_smile:
Your configuration seems fine.

I’m thinking you might run into the situation under the asterisk *: the [[+parent_alias]] maybe doesn’t exist and that’s why it drops the rest of the path? Or maybe the remaining string with a leading slash isn’t working? (like “/rootpage/”, which results with your media-source-settings to “assets/uploads//rootpage/” and maybe your OS doesn’t like double-slashes?

Have you tried uploading on a resource, that is at least 2 levels deep? Does it work then maybe?
What happens if you just try “[[+alias]]/”? Also upload in root?

Thanks @sebastian-marinescu for your help :slight_smile: I have tried to simplify the path with [[+parent]]/[[+id]] but something still going wrong.
But I think there are two issues : one during link generation after picture insertion, and another one while upload process with wrong path.
I have recorded a short screencast to show you the issue : Spheerys Cloud

I completely remove and purge Redactor.
And then, after new installation, I tested again.
The problem is still there and I’m blocked with this issue :frowning:

I’ve made a note to look into this for you Monday. Not sure why that’s not working for you.

It would be useful to know which other extras you are using, especially any plugins that might interact with uploads.

Here the list on my addons :

Darn, it looks like the path placeholders have been broken for a while, since v3.1.0 from the looks of it.

Not quite sure how that’s slipped past me for so long. There must’ve been other reports of it in that time but I’m not immediately seeing it in our tracker. And I use this feature myself all the time, so no idea how I didn’t spot it wasn’t working myself either! :see_no_evil:

I’m wrapping up a fix right now, should have that released either tonight or tomorrow.

I’m not seeing the issue with the first character of the filename going missing, though. Also tried it with the filetranslit extra, but that’s still working fine here. On the surface, that doesn’t look like it would be related to the issues with the path placeholders, so that is still open. Would you be able to give me access to your site (email to debug that @Spheerys?

I sent you the credential on your gmail mailbox (sorry, I re-read your post after sending it).

Thanks :slight_smile:

What email address did you send it to? I’m not seeing anything in any of my inboxes :thinking:

Found it! It was in the spam folder.

Thanks, it took a bit of digging but I’ve gotten it fixed. I’ve released 3.1.4, updated your site, and verified your [[+parent]]/[[+id]] upload path now works, and the filename doesn’t lose its first character anymore either.

Sorry it took so long from your initial post to get this resolved.


Thanks for the fix, it’s working well now :slight_smile: