Troubles with the builder (2.7.0)

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

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

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 ?

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