Mautic fix for forms hanging on “Please wait…” happens when installed in subdirectory

Since 2.8.2, a bunch of Mautic forms were hanging on “Please wait…”, even though the form data was going through, this is not a good customer experience.  Here is the fix for it on Git Hub from the Mautic team.  It turns out, this issue only happened for Mautic instances running in a sub-directory.

I think it’s usually best to put Mautic on a site within a sub-directory, perhaps in “/marketing” to keep it out of the way and not conflicting with your site’s WordPress or Drupal CMS.

This fix just came off Git Hub from the Mautic marketing automation developers yesterday.  Inside your Mautic folder, go to /media/js and make this change to both files, “mautic-form-src.js” and “mautic-form.js”:

if (event.origin !== MauticDomain) return;

// Replace the above with these two lines in both files

var MauticDomainWithoutPath = MauticDomain.match(/https?:\/\/[^\/]*/);
if (event.origin != MauticDomainWithoutPath) return;

I can confirm that this patch to these two .js files fixes the problem of “Please wait…” upon form submission and the form will behave upon submission properly, whether to show a message or perform a redirect.

Besides being free, why choose Mautic for your organization’s marketing automation?

As a web PHP developer in Jacksonville with over 13 years experience integrating and developing from scratch different systems, I have seen the rise of Mautic as a free marketing automation platform that rivals much more expensive platforms.  I can’t say enough great things about Mautic marketing automation and one of the best things about it that other experienced web developers who appreciate the power of leverage PHP frameworks is the fact Mautic is built on Symfony, my preferred collaborative full stack development framework I’ve been using now for over four years.

The fact Mautic is built on Symfony means that it is fully extendable and since it is by nature modular by design, it is easy to create your own custom themes for brands, channels and create other behaviors that other marketing automation platforms don’t even allow your programmer’s to access because they are completely closed systems.  This usually means if you have the right web developers with the “programmer’s mentality“, there is nothing you can’t get Mautic to do for your organization!

A special thanks to John Linhart and Michael Van Laar, Mautic geniuses!  By the way, a special message to Mr. Linhart — thank you for all your hard work and competent development of Mautic, it’s tough to read some of the messages, so many people don’t understand how complex these things are because you make it look easy!  Keep up the great work (please)….  🙂

admin has written 5 articles

One thought on “Mautic fix for forms hanging on “Please wait…” happens when installed in subdirectory

Leave a Reply

Your email address will not be published. Required fields are marked *