- Issue created by @jorgik
- Merge request !14Issue #3478074: Mautic forms keep trying to load while mautic is down (ex. Maintenance) → (Open) created by jorgik
When Mautic is not available or responds slowly, the embedded forms can block the page load, leading to a poor user experience. This is because the script tag for loading Mautic forms is not deferred, and there's no timeout mechanism in place.
1. Set up a Drupal site with the Mautic Paragraph module.
2. Configure a Mautic form to be displayed on a page.
3. Temporarily disable or slow down your Mautic instance.
4. Load the page with the Mautic form.
5. Observe that the page load is blocked or significantly delayed.
1. Add the `defer` attribute to the script tag in the Twig template to prevent blocking page load.
2. Implement a timeout setting in the MauticParagraphConnectorPluginBase to allow users to set a maximum wait time for Mautic responses.
A new field will be added to the Mautic connector configuration form to allow setting the timeout value.
No significant API changes. The `MauticParagraphConnectorPluginBase` class will have a new configuration option for timeout.
No data model changes are required for this update.
Active
1.1
Code