Your software
My Mautic version is: v4.4.1
My PHP version is: 7.4.23
My Database type and version is: 10.3.34-MariaDB-0ubuntu0.20.04.1
Your problem
My problem is:
I am using mautic Lead form in my own website and it is working fine and lead is also capture properly.
but problem is the page where lead form is integrated when I inspect that page I am getting below error , no idea from where this is coming and how to resolve this.
Uncaught ReferenceError: Mautic is not defined
at parcelRequire.RfSX…/asset.service (builder.js:156:1)
at f (builder.js?v4e51210b:1:468)
at parcelRequire.iHk9 (builder.js?v4e51210b:1:771)
at builder.js?v4e51210b:1:1023
File Path : mautic/plugins/GrapesJsBuilderBundle/Assets/library/js/dist/builder.js
Mautic.launchBuilder = launchBuilderGrapesjs;
Mautic.initSelectTheme = initSelectThemeGrapesjs(Mautic.initSelectTheme);
Mautic.setThemeHtml = setThemeHtml;
Please guide us. Awaiting for your response.
adiux
November 2, 2022, 8:14am
2
This looks like Grapesjs (the email builder) is loaded - but it should not.
Are you using it on a Mautic landingpage or are you integrating it into your own website?
I am using mautic lead form on my own website. Thanks
We are integrated mautic lead form into our own website,
Please suggest some solution so that we can apply it at our end.
Awaiting for your response.
adiux
November 3, 2022, 9:02am
5
@shyamalm how did you integrate it? Are you using a CMS?
Mautic inbulid Iframe code integrated in our website.
adiux
November 9, 2022, 9:10am
7
Is it an option to try via the JavaScript (recommended)?
<script type="text/javascript" src="https://YOURMAUTIC/form/generate.js?id=1"></script>
I think your issue is related to this:
opened 06:25AM - 01 Oct 21 UTC
bug
builder-grapesjs
### Mautic Version
4.0.0
### PHP version
4.1
### What browsers are you seein… g the problem on?
Not relevant
### What happened?
`Mautic is not defined` will show on javascript console when using preference center and grapejs
![image](https://user-images.githubusercontent.com/12627658/135575134-b0ccc0fc-a769-4bff-8df9-4cfe8aca5843.png)
### How can we reproduce this issue?
- Activate GrapeJS plugin
- Activate the Preference center
- Try to unsubscribe using the preference center
- GrapeJS assets (cs & js) will be loaded although they are not require
- `Mautic is not defined` will show on javascript console
### Relevant log output
_No response_
### Code of Conduct
- [X] I confirm that I have read and agree to follow this project's Code of Conduct
<bountysource-plugin>
---
Want to back this issue? **[Post a bounty on it!](https://app.bountysource.com/issues/108498987-grapejs-plugin-inject-assets-to-preference-center?utm_campaign=plugin&utm_content=tracker%2F5355074&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://app.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F5355074&utm_medium=issues&utm_source=github).
</bountysource-plugin>