/form/generate.js?id=1 not show form

Your software
My Mautic version is: 4.2.1
My PHP version is: 7.4
My Database type and version is:
Nginx

Your problem
My problem is:
i try generate form from

but /form/generate.js?id=1 not show

These errors are showing in the log: log is clean

Steps I have tried to fix the problem:
rebuild form cache
clear cach

Maybe @escopecz knows the answer.

the problem is NOT in the plagin

problem in generate.js that’s he’s not generated forms
Example, you can test:
https://m.everest-dom.com/form/generate.js?id=1

you can paste this line to your site (I turned off CORS temporarily) and nothing will happen - the form will not be generated

have you checked your web server configurations ? I had some issues with nginx in the past

i have default nginx config…

i see this bug

but i don’t have 404 error

in nginx make sure you have enabled *.js

location ~ /(mtc.js|1.js|.*\.js|mtracking.gif|.*\.gif|mtc) {

Many default Mautic nginx configurations are

location ~ /(mtc.js|1.js|mtracking.gif|.*\.gif|mtc) {

sorry last thing - are you getting any console errors ?

I don’t have such lines at all
What should be in brackets below?

only

[2022-04-28 10:13:52] mautic.NOTICE: PHP Notice - Trying to access array offset on value of type bool - in file /home/master/m.everest-dom.com/plugins/MauticFocusBundle/Include/lessc.inc.php - at line 719 {“args”:,“orderedValues”:,“keywordValues”:,“assignedValues”:,“i”:0,“last”:false}

these are your log files, if you are on chrome you can right click and “inspect” and then choose “console” to see if there are any other errors there.

To get a full explanation of nginx and setting up Mautic check out here. He has a full nginx conf file there that you can use, however you need to make the changes to it that I recommended above.

it was the first thing I looked at. It’s clean…

interesting that focus working perfectly

voodoo magic. Glad it is all working now

No, not working (
Forms not showing

maybe try and change your base url to Mautic and see if that works

Does it work for you? Can I see somewhere how it is implemented?

I changed the nginx config…
F12 in Firefox - no errors

inserting a form through js code does not work.

You can try it:
<script type="text/javascript" src="//m.mautibox.ru/form/generate.js?id=3"></script>

can you try two things:

  1. in your src, add in https: src=“https://m.mautibox.ru/form/generate.js?id=3”
    and if that still does not work, try and adding in index.php as well: src=“https://m.mautibox.ru/index.php/form/generate.js?id=3”

I tried it right away, I thought it might not work out the way. Did not help.
But the interesting thing is that the focus works great


it’s a gravcms

if focus work fine, but forms not working - i think that problem in generate.js

Ha-ha-ha :grinning:
Earned!
the problem was in

i removed js from hear and all Earned

1 Like

@mikew - adding the /index.php/ to the js for a form did the trick.

The bigger question though is how do I set up my Mautic so I don’t need to manually add in /index.php/ to each js script to get a mautic form to render?

Hey Rob,

It is an nginx conf file misconfiguration, I fixed this on your server - so please check and let me know if working now.

1 Like