# Duplicate subfolder - possible bug?

**URL:** <https://forum.mautic.org/t/duplicate-subfolder-possible-bug/8690>\
**Category:** Product Support\
**Created:** [June 8, 2017, 6:49pm UTC](https://forum.mautic.org/t/duplicate-subfolder-possible-bug/8690 "2017-06-08T18:49:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tcore](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tcore/32/13555_2.png) [@tcore](https://forum.mautic.org/u/tcore)\
**Post date:** [June 8, 2017, 6:49pm UTC](https://forum.mautic.org/t/duplicate-subfolder-possible-bug/8690/1 "2017-06-08T18:49:48Z")

</div>

Hi all,  
  
  
  
I’m new to Mautic and have just started to discover the system. The Installation runs so far good, but I found some places that seem to have a wrong URL. What is intersting is that it’s not everywhere but only in parts of the system:  
  
  
  
Exemple:

- Installation in subfolder  
- [www.domain.com/m/](http://www.domain.com/m/)  
- Self hosted  
- Version 2.8.2  
- Cache Flushed…  
- site URL: http///www.domain.com/m/  
- Relative path to the images directory: /m/media/images  
  
  
  
  
  
Problem in mtc.js : Most of the URLs are correct, but those lines:  

Code:

MauticJS.replaceDynamicContent=function(){var dynamicContentSlots=document.querySelectorAll('.mautic-slot');if(dynamicContentSlots.length){MauticJS.iterateCollection(dynamicContentSlots)(function(node,i){var slotName=node.dataset.slotName;var url='http://www.domain.com/m/dwc/slotNamePlaceholder'.replace('slotNamePlaceholder',slotName);MauticJS.makeCORSRequest('GET',url,{},function(response,xhr){if(response.length){node.innerHTML=response;if(response.search("mauticform\_wrapper")\>0){if(typeof MauticSDK=='undefined'){MauticJS.insertScript('http://www.domain.com/m/m/media/js/mautic-form.js');var fileInterval=setInterval(function(){if(typeof MauticSDK!='undefined'){MauticSDK.onLoad();clearInterval(fileInterval);}},100);}else{MauticSDK.onLoad();}}

  
and  

Code:

MauticJS.mauticInsertedScripts=MauticJS.mauticInsertedScripts||{};if("undefined"==typeof jQuery&&"undefined"==typeof MauticJS.mauticInsertedScripts.jQuery){MauticJS.insertScript('http://www.domain.com/m/m/app/bundles/CoreBundle/Assets/js/libraries/2.jquery.js');MauticJS.mauticInsertedScripts.jQuery=true;} if("undefined"==typeof Froogaloop&&"undefined"==typeof MauticJS.mauticInsertedScripts.Froogaloop){MauticJS.insertScript('https://f.vimeocdn.com/js/froogaloop2.min.js');MauticJS.mauticInsertedScripts.Froogaloop=true;} if("undefined"==typeof jQuery||"undefined"==typeof Froogaloop){MauticJS.gatedVideoTimeoutID=window.setTimeout(MauticJS.initGatedVideo,1000);}else{MauticJS.insertStyle('http://www.domain.com/m/m/media/css/mediaelementplayer.css');

  
  
  
Also when I load any email template with images in them the URLs to the root folder are all duplicated  

Code:

 ![facebook](http://www.domain.com/m/m/themes/neopolitan/img/facebook.gif)

  
Is this a bug or is there an issue with my configuration?  
  
Thanks

---

<div class="post-metadata">

**Author:** ![tcore](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tcore/32/13555_2.png) [@tcore](https://forum.mautic.org/u/tcore)\
**Post date:** [June 8, 2017, 6:49pm UTC](https://forum.mautic.org/t/duplicate-subfolder-possible-bug/8690/2 "2017-06-08T18:49:48Z")

</div>

Hi all,

I’m new to Mautic and have just started to discover the system. The Installation runs so far good, but I found some places that seem to have a wrong URL. What is intersting is that it’s not everywhere but only in parts of the system:

Exemple:

- Installation in subfolder
- [www.domain.com/m/](http://www.domain.com/m/)
- Self hosted
- Version 2.8.2
- Cache Flushed…
- site URL: http///www.domain.com/m/
- Relative path to the images directory: /m/media/images

Problem in mtc.js : Most of the URLs are correct, but those lines:

```auto
MauticJS.replaceDynamicContent=function(){var dynamicContentSlots=document.querySelectorAll('.mautic-slot');if(dynamicContentSlots.length){MauticJS.iterateCollection(dynamicContentSlots)(function(node,i){var slotName=node.dataset.slotName;var url='http://www.domain.com/m/dwc/slotNamePlaceholder'.replace('slotNamePlaceholder',slotName);MauticJS.makeCORSRequest('GET',url,{},function(response,xhr){if(response.length){node.innerHTML=response;if(response.search("mauticform_wrapper")>0){if(typeof MauticSDK=='undefined'){MauticJS.insertScript('http://www.domain.com/m/m/media/js/mautic-form.js');var fileInterval=setInterval(function(){if(typeof MauticSDK!='undefined'){MauticSDK.onLoad();clearInterval(fileInterval);}},100);}else{MauticSDK.onLoad();}}
```

and

`MauticJS.mauticInsertedScripts=MauticJS.mauticInsertedScripts||{};if("undefined"==typeof jQuery&&"undefined"==typeof MauticJS.mauticInsertedScripts.jQuery){MauticJS.insertScript('http://www.domain.com/m/m/app/bundles/CoreBundle/Assets/js/libraries/2.jquery.js');MauticJS.mauticInsertedScripts.jQuery=true;}
if("undefined"==typeof Froogaloop&&"undefined"==typeof MauticJS.mauticInsertedScripts.Froogaloop){MauticJS.insertScript('https://f.vimeocdn.com/js/froogaloop2.min.js');MauticJS.mauticInsertedScripts.Froogaloop=true;}
if("undefined"==typeof jQuery||"undefined"==typeof Froogaloop){MauticJS.gatedVideoTimeoutID=window.setTimeout(MauticJS.initGatedVideo,1000);}else{MauticJS.insertStyle('http://www.domain.com/m/m/media/css/mediaelementplayer.css');`

Also when I load any email template with images in them the URLs to the root folder are all duplicated

```auto
<img src="http://www.domain.com/m/m/themes/neopolitan/img/facebook.gif" alt="facebook" class="fr-fic fr-dii">
```

Is this a bug or is there an issue with my configuration?

Thanks

---

<div class="post-metadata">

**Author:** ![tcore](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tcore/32/13555_2.png) [@tcore](https://forum.mautic.org/u/tcore)\
**Post date:** [July 20, 2017, 12:06pm UTC](https://forum.mautic.org/t/duplicate-subfolder-possible-bug/8690/3 "2017-07-20T12:06:02Z")

</div>

Thanks @kuzmany ,

I followed the developpment but am no sure if the bug is resolved or still in testing.

I just updated to the latest version and the described bugs are still there
