Mautic Community Forums

Landing Pages in Code Mode not working as they did

Your software
My Mautic version is: 4.1
My PHP version is: 7.4
My Database type and version is: 10.3.32-MariaDB-0ubuntu0.20.04.1

Your problem
My problem is: When creating a landing page in “Code Mode”, we drop the HTML file in place as we always have, but the page no longer renders and mautic rewrites the code. We have used leadpages to create the HTML and drop here. Here is the code we are attempting to drop

<html>
  <head>
    <meta property="og:url" content="https://dfir.world/csh-media-kit-thank-you-page/" />
    <link rel="opengraph" href="https://dfir.world/csh-media-kit-thank-you-page/" />
    <script src="//dfir.world/_/js/csh-media-kit-thank-you-page/"></script>
  </head>
</html>

HERE IS WHAT MAUTIC CHANGES IT TO ON SAVE…

<!DOCTYPE html>
<head>
  <meta property="og:url" content="https://dfir.world/csh-media-kit-thank-you-page/">
  <link rel="opengraph" href="https://dfir.world/csh-media-kit-thank-you-page/">
  <style>
  </style>
</head>
<body>
</body>

The JS is being removed. Lead pages has a dynamic builder, meaning I can change the page at leadpages and the changes happen in Mautic. A recent change has caused this to no longer work.

These errors are showing in the log:

Steps I have tried to fix the problem:

Yes, I can confirm that.
Joey

1 Like

I haven’t had a lot of time to look at it. I think the js code is the issue. It will work as expected with “static” code (no js)