Mautic 4.4.4 mjml themes are not available after being installed

Your software
My Mautic version is: 4.4.4
My PHP version is: 7.4.30
My Database type and version is: mysql Ver 15.1 Distrib 10.5.15-MariaDB, for debian-linux-gnu (x86_64)
Web sever: nginx 1.18.0 . The nginx configuration files are inspired by the one in this link Install Mautic Self-Hosted Email Marketing on Ubuntu 18.04 Server

Your problem
My problem is: I am trying to build an email theme from existing theme with mjml. After downloading the existing theme, I modify only the name of the theme and the author in the config.json file. All files in the folder is compressed into a zip file, which is uploaded in Themes (below the right hand side Settings button). The upload is successful (theme … has been installed). However, I do not see this theme when creating a new landing page. Indeed, there are only 2 themes available when creating a new landing page (Code and Blank). In addition, in Channels, when selecting Emails, nothing happens whereas Marketing messages, Focus items or Social monitering are functional.

These errors are showing in the log: I don’t see any error message in the interface or in the log file var/log/mautic_prod-2022-11-05.php

Steps I have tried to fix the problem: 1. log out of the instance, log in again 2. try 3 different themes (neopolitain, brizen, confirmme) 3. use command line mjml -r email.mjml -o email.html.twig to create the .html.twig file. 4. looking inside all settings (I’m a beginner, installed Mautic yesterday and am learning actively).

Thank you very much for you suggestions. Cheers.

Make sure grape js plugin is activated and enabled

@mzagmajster Thank you for your reply. I checked again, and see that in the right hand side Settings > Plugins > Manage plugins > GrapeJS, under the tab Enabled/auth, “Plugin must be enabled and authorized for this field to work” is set as Yes. Plus, when adding a Landing page from the blank theme, I see the Builder (which I understand is GrapeJS).

For more information, I paid attention when creating the zip file at the right level (with the needed files and folders, not from their parent directory).

I’m still stuck there, not seeing the themes for landing pages and Emails section is still inactive.

Any suggestion is really appreciated. Thank you.

Hi,
can you plz share the config file here?
I think the issue is with that. Maybe you are updating from M3? The config file was different back then.
Joey

@joeyk Hi Joey, as a newbie, I’m not sure which configuration file you are talking about (I am having a doubt about the nginx configuration file, so I put it here).

The instance is installed from a zip file downloaded from https://github.com/mautic/mautic/releases/download/4.4.4/4.4.4.zip . It is not an update. This is the first time I install mautic.

What I am doing, is to try another install with docker on a different machine to see if the themes and mails are still missing.

In the following, you will see the nginx configuration file (on the upstream server). I have another configuration file for the reverse proxy.

# https://www.linuxbabe.com/ubuntu/install-mautic-self-hosted-email-marketing-platform-ubuntu-18-04

server {
   listen 80;
   listen [::]:80;
   server_name mautic.mydomain.com;

   root /var/www/html/mautic;
   error_log /var/log/nginx/mautic.error;
   access_log /var/log/nginx/mautic.access;
   client_max_body_size 20M;

   index index.php index.html index.htm index.nginx-debian.html;

   location / {
     # try to serve file directly, fallback to app.php
     try_files $uri /index.php$is_args$args;
   }

   location ~ /(mtc.js|1.js|mtracking.gif|.*\.gif|mtc) {
       # default_type "application/javascript";
       try_files $uri /index.php$is_args$args;
   }

   # redirect some entire folders
     rewrite ^/(vendor|translations|build)/.* /index.php break;

   location ~ \.php$ {
     include snippets/fastcgi-php.conf;
     fastcgi_pass unix:/run/php/php7.4-fpm.sock;
     #Note: If you install Mautic on iRedMail server, you should use the TCP socket instead.
     #fascgi_pass 127.0.0.1:9999
   }

   location ~* ^/index.php {
     # try_files $uri =404;
     fastcgi_split_path_info ^(.+\.php)(/.+)$;
     # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini

     fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
     #Note: If you install Mautic on iRedMail server, you should use the TCP socket instead.
     #fascgi_pass 127.0.0.1:9999
     fastcgi_index index.php;
     fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
     include fastcgi_params;

     fastcgi_buffer_size 128k;
     fastcgi_buffers 256 16k;
     fastcgi_busy_buffers_size 256k;
     fastcgi_temp_file_write_size 256k;
   }

    # Deny everything else in /app folder except Assets folder in bundles
    location ~ /app/bundles/.*/Assets/ {
        allow all;
        access_log off;
    }
    location ~ /app/ { deny all; }

    # Deny everything else in /addons or /plugins folder except Assets folder in bundles
    location ~ /(addons|plugins)/.*/Assets/ {
        allow all;
        access_log off;
    }
    # location ~ /(addons|plugins)/ { deny all; }

    # Deny all php files in themes folder
      location ~* ^/themes/(.*)\.php {
        deny all;
    }

    # Don't log favicon
    location = /favicon.ico {
        log_not_found off;
        access_log off;
    }

    # Don't log robots
    location = /robots.txt  {
        access_log off;
        log_not_found off;
    }

    # Deny yml, twig, markdown, init file access
    location ~* /(.*)\.(?:markdown|md|twig|yaml|yml|ht|htaccess|ini)$ {
        deny all;
        access_log off;
        log_not_found off;
    }

     # Allow access to certbot directory in order to obtain TLS certificate
     location ~ /.well-known/acme-challenge {
        allow all;
     }
    # Deny all attempts to access hidden files/folders such as .htaccess, .htpasswd, .DS_Store (Mac), etc...
    location ~ /\. {
        deny all;
        access_log off;
        log_not_found off;
    }

    # Deny all grunt, composer files
    location ~* (Gruntfile|package|composer)\.(js|json)$ {
        deny all;
        access_log off;
        log_not_found off;
    }

    # Deny access to any files with a .php extension in the uploads directory
        location ~* /(?:uploads|files)/.*\.php$ {
                deny all;
    }

     # A long browser cache lifetime can speed up repeat visits to your page
  location ~* \.(jpg|jpeg|gif|png|webp|svg|woff|woff2|ttf|css|js|ico|xml)$ {
       access_log        off;
       log_not_found     off;
       expires           360d;
  }
}

Hi,
Sorry I should have been more specific.
I need the config.json file content from the zip file of your mjml template.

Here they are for the three themes that I modified. Thank you for your time.

I did not see any error when uploading these themes. It just says: theme… has been installed.

{
    "name": "welcome",
    "author": "Vincent",
    "authorUrl": "http://mydomain.com",
    "builder": "grapesjsbuilder",
    "features": [
      "email"
    ]
  }
{
  "name": "My Neo",
  "author": "Vincent",
  "authorUrl": "https://www.sendwithus.com",
  "features": [
    "page",
    "email",
    "form"
  ]
}
{
  "name": "Hello",
  "author": "Me",
  "authorUrl": "https://mydomain.com",
  "builder": "grapesjsbuilder",
  "features": [
    "email"
  ]
}

Ok, change it like this:


{
    "name": "welcome",
    "author": "Vincent",
    "authorUrl": "http://mydomain.com",
    "builder": ["grapesjsbuilder"],
    "features": [
      "email"
    ]
  }

Since M4 the builder settings have to be an array, in other words

“grapesjsbuilder”
not good
[‘grapesjsbuilder’]
good
:slight_smile:

oh… yes. that is. I see now why all those themes do not show up in my window. Thank you much Joey.

For those who face the same “issue” in the future, this is the solution: [‘grapesjsbuilder’]

However, the Emails section in Channels is still inactive. When I click on it, nothing happens. Is this some thing that I also neglected? or should I create another topic.

Make another topic.

But before try clearing your cache, it should be the solution.
Joey

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.