# Troubles with the builder (2.7.0)

**URL:** <https://forum.mautic.org/t/troubles-with-the-builder-2-7-0/8046>\
**Category:** Product Support\
**Created:** [March 29, 2017, 6:38am UTC](https://forum.mautic.org/t/troubles-with-the-builder-2-7-0/8046 "2017-03-29T06:38:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marc\_Jarrossay](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@Marc\_Jarrossay](https://forum.mautic.org/u/Marc_Jarrossay)\
**Post date:** [March 29, 2017, 6:38am UTC](https://forum.mautic.org/t/troubles-with-the-builder-2-7-0/8046/1 "2017-03-29T06:38:49Z")

</div>

Hi  
  
Mautic 2.7.0 ot 2.7.1  
  
I’ve some troubles with the builder since this version.  
  
When I launch the builder with any template, I can’t modify text or drag and drop from the panel.  
  
3 javascript errors :

- Uncaught SyntaxError: Unexpected identifier  
- Uncaught ReferenceError: mauticLang is not defined (app.js: 6)  
- Uncaught ReferenceError: mauticAjaxUrl is not defined (app.js: 10)  
  
Any ideas ?  
  
  
  
Thanks

---

<div class="post-metadata">

**Author:** ![Marc\_Jarrossay](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@Marc\_Jarrossay](https://forum.mautic.org/u/Marc_Jarrossay)\
**Post date:** [March 29, 2017, 6:38am UTC](https://forum.mautic.org/t/troubles-with-the-builder-2-7-0/8046/2 "2017-03-29T06:38:49Z")

</div>

Hi  
Mautic 2.7.0 ot 2.7.1  
I’ve some troubles with the builder since this version.  
When I launch the builder with any template, I can’t modify text or drag and drop from the panel.  
3 javascript errors :

- Uncaught SyntaxError: Unexpected identifier
- Uncaught ReferenceError: mauticLang is not defined (app.js: 6)
- Uncaught ReferenceError: mauticAjaxUrl is not defined (app.js: 10)  
Any ideas ?

Thanks

---

<div class="post-metadata">

**Author:** ![Marc\_Jarrossay](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@Marc\_Jarrossay](https://forum.mautic.org/u/Marc_Jarrossay)\
**Post date:** [March 30, 2017, 12:23pm UTC](https://forum.mautic.org/t/troubles-with-the-builder-2-7-0/8046/3 "2017-03-30T12:23:00Z")

</div>

mauticLang is not defined  
When I’ve seen this message, I’ve tried by chance to change the user language to English. And it works !!  
(the chosen language was French)

Is this the beginning of a track ?

---

<div class="post-metadata">

**Author:** ![leoschuler](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/leoschuler/32/4798_2.png) [@leoschuler](https://forum.mautic.org/u/leoschuler)\
**Post date:** [March 28, 2021, 6:42pm UTC](https://forum.mautic.org/t/troubles-with-the-builder-2-7-0/8046/4 "2021-03-28T18:42:42Z")

</div>

mauticLang is not defined error appeared to me after I include a form in my WebPage,  
I was able to fix with some investigation, here is what I found

cause of the error: I include the loading of the mautic script into a loading function, together with other loading resources. the code created two global variables, MauticDomain and MauticLang, but because I included the code in another context (the execution of the function, those variables became local ones), to fix it, I change the code from:

```
    var MauticDomain = '<YOUR DOMAIN HERE>';
    var MauticLang = {
        'submittingMessage': "Please wait..."
    }

```

to

```
    window.MauticDomain = '<YOUR DOMAIN URL HERE>';
    window.MauticLang = {
        'submittingMessage': "Please wait..."
    }

```

that way I force those vars to be in the global context and the script worked, here is the final version of the loading script:

if (typeof MauticSDKLoaded == ‘undefined’) {

```
    var MauticSDKLoaded = true;

    var head = document.getElementsByTagName('head')[0];

    var script = document.createElement('script');

    script.type = 'text/javascript';

    script.src = 'https://mautic.seuimpresso.com.br/media/js/mautic-form.js';

    script.onload = function() {

        MauticSDK.onLoad();

    };

    head.appendChild(script);

    window.MauticDomain = 'https://mautic.seuimpresso.com.br';

    window.MauticLang = {

        'submittingMessage': "Please wait..."

    }

}else if (typeof MauticSDK != 'undefined') {

    MauticSDK.onLoad();

}

```

of course another way to fix the problem was just to paste the loading code directly into the html page, but I prefer to make my code cleaner by including this into a separated script
