# Placeholders in image path doesn't work

**URL:** <https://forum.modmore.com/t/placeholders-in-image-path-doesnt-work/2379>\
**Category:** Redactor\
**Created:** [August 6, 2022, 9:55am UTC](https://forum.modmore.com/t/placeholders-in-image-path-doesnt-work/2379 "2022-08-06T09:55:03Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Spheerys](https://forum.modmore.com/user_avatar/forum.modmore.com/spheerys/32/158_2.png) [@Spheerys](https://forum.modmore.com/u/Spheerys)\
**Post date:** [August 6, 2022, 9:55am UTC](https://forum.modmore.com/t/placeholders-in-image-path-doesnt-work/2379/1 "2022-08-06T09:55:03Z")

</div>

Hi,

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 :

 ![bug-redactor2](https://forum.modmore.com/uploads/default/original/1X/d1de74bb35f3374f370eb010006773262c865224.png)  
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 :

 ![bug-redactor](https://forum.modmore.com/uploads/default/original/1X/51917e7fbbfd8914940b5c50387da70e3b8c91ce.png)

What’s going wrong ?

---

<div class="post-metadata">

**Author:** ![sebastian-marinescu](https://forum.modmore.com/user_avatar/forum.modmore.com/sebastian-marinescu/32/252_2.png) [@sebastian-marinescu](https://forum.modmore.com/u/sebastian-marinescu)\
**Post date:** [August 11, 2022, 8:16pm UTC](https://forum.modmore.com/t/placeholders-in-image-path-doesnt-work/2379/2 "2022-08-11T20:16:38Z")

</div>

Hi @Spheerys 🙂  
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?

---

<div class="post-metadata">

**Author:** ![Spheerys](https://forum.modmore.com/user_avatar/forum.modmore.com/spheerys/32/158_2.png) [@Spheerys](https://forum.modmore.com/u/Spheerys)\
**Post date:** [August 17, 2022, 3:04pm UTC](https://forum.modmore.com/t/placeholders-in-image-path-doesnt-work/2379/3 "2022-08-17T15:04:23Z")

</div>

Thanks @sebastian-marinescu for your help 🙂 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](https://cloud.spheerys.fr/index.php/s/ATLnfpQQc77j9LS)

---

<div class="post-metadata">

**Author:** ![Spheerys](https://forum.modmore.com/user_avatar/forum.modmore.com/spheerys/32/158_2.png) [@Spheerys](https://forum.modmore.com/u/Spheerys)\
**Post date:** [September 24, 2022, 3:31pm UTC](https://forum.modmore.com/t/placeholders-in-image-path-doesnt-work/2379/4 "2022-09-24T15:31:07Z")

</div>

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 ☹

---

<div class="post-metadata">

**Author:** ![mhamstra](https://forum.modmore.com/user_avatar/forum.modmore.com/mhamstra/32/459_2.png) [@mhamstra](https://forum.modmore.com/u/mhamstra)\
**Post date:** [September 24, 2022, 5:09pm UTC](https://forum.modmore.com/t/placeholders-in-image-path-doesnt-work/2379/5 "2022-09-24T17:09:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Spheerys](https://forum.modmore.com/user_avatar/forum.modmore.com/spheerys/32/158_2.png) [@Spheerys](https://forum.modmore.com/u/Spheerys)\
**Post date:** [September 24, 2022, 6:04pm UTC](https://forum.modmore.com/t/placeholders-in-image-path-doesnt-work/2379/6 "2022-09-24T18:04:35Z")

</div>

Here the list on my addons :

 ![image](https://forum.modmore.com/uploads/default/original/1X/6c8456d97a29804e2f3fcc3c80dbf88b1ade8890.png)

---

<div class="post-metadata">

**Author:** ![mhamstra](https://forum.modmore.com/user_avatar/forum.modmore.com/mhamstra/32/459_2.png) [@mhamstra](https://forum.modmore.com/u/mhamstra)\
**Post date:** [September 26, 2022, 5:19pm UTC](https://forum.modmore.com/t/placeholders-in-image-path-doesnt-work/2379/7 "2022-09-26T17:19:12Z")

</div>

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! 🙈

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 [support@modmore.com](mailto:support@modmore.com)) to debug that @Spheerys?

---

<div class="post-metadata">

**Author:** ![Spheerys](https://forum.modmore.com/user_avatar/forum.modmore.com/spheerys/32/158_2.png) [@Spheerys](https://forum.modmore.com/u/Spheerys)\
**Post date:** [September 26, 2022, 7:57pm UTC](https://forum.modmore.com/t/placeholders-in-image-path-doesnt-work/2379/8 "2022-09-26T19:57:15Z")

</div>

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

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![mhamstra](https://forum.modmore.com/user_avatar/forum.modmore.com/mhamstra/32/459_2.png) [@mhamstra](https://forum.modmore.com/u/mhamstra)\
**Post date:** [September 26, 2022, 9:15pm UTC](https://forum.modmore.com/t/placeholders-in-image-path-doesnt-work/2379/9 "2022-09-26T21:15:07Z")

</div>

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

Found it! It was in the spam folder.

---

<div class="post-metadata">

**Author:** ![mhamstra](https://forum.modmore.com/user_avatar/forum.modmore.com/mhamstra/32/459_2.png) [@mhamstra](https://forum.modmore.com/u/mhamstra)\
**Post date:** [September 26, 2022, 9:55pm UTC](https://forum.modmore.com/t/placeholders-in-image-path-doesnt-work/2379/10 "2022-09-26T21:55:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Spheerys](https://forum.modmore.com/user_avatar/forum.modmore.com/spheerys/32/158_2.png) [@Spheerys](https://forum.modmore.com/u/Spheerys)\
**Post date:** [September 27, 2022, 3:53pm UTC](https://forum.modmore.com/t/placeholders-in-image-path-doesnt-work/2379/11 "2022-09-27T15:53:33Z")

</div>

Thanks for the fix, it’s working well now 🙂
