HTML GrapesJS builder not opening or saving custom theme landing page

I developed a html landing page to use in Mautic theme based on Bootstrap 5.2 framework.

When I installed my new theme in Mautic and then open the html builder, it loaded the one from the blank theme not the one I developed and uploaded to theme. I double check everything and it still load the blank theme.

Since I also have custom email in same theme so I went over to email and it does load my custom email theme in the GrapesJS builder.

I went back to landing page and select my custom theme, it still load the blank theme landing page. I even tried saving the landing page and it still shows the blank page theme via URL.

Is it a bug??

Or am I doing something wrong?

Make sure you let mautic now that theme can be used for landing pages as well.

You need to check the config and of course you also need to develop templates for landing page.

Maybe check dev console for any clues?

Curious, how many Mautic landing pages theme do you see in your Mautic when you go to the landing page selection? I only see one which is the blank theme.

I don’t see other landing page theme like the “Sunday”, “Fresh”, or “Skyline” etc. even thou all those are installed as default.

You were right to check the logs … Here what I found …

[2022-10-19 12:54:51] mautic.CRITICAL: Uncaught PHP Exception Twig\Error\SyntaxError: "Unexpected character "'"." at /home/agwmadmin/ line 13 {"exception":"[object] (Twig\\Error\\SyntaxError(code: 0): Unexpected character \"'\". at /home/agwmadmin/"} {"hostname":"","pid":26011}

Here the line 13 but I am not sure if I see the error in it.

<div class="col"><img class="img-fluid" src="{{ getAssetUrl('themes/'~template~'/assets/img/btg-1200.jpg"></div>

I think I see what I did wrong … forgot to close it … I think …

fixing …

Now, it loads into the GrapesJS landing builder after I fixed my mistake …

But …

It should display a pop up message or something like “There an error with the theme code” instead of loading the theme “Blank” which was causing me some confusion.

1 Like

It seems to load whatever the default theme is set in the Mautic theme configuration but that still could cause some confusion for theme developers.

Like I said in previous post, need a pop up error box instead of loading the default theme to ease confusion.

Anyhow, got my theme loaded and editable !

Thanks @mzagmajster for pointing out the logs … totally completely forgotten about the logs … again that default theme was causing me confusions since it spilled no error message :stuck_out_tongue: