Mautic 4.4.4 images are not displayed in landing page and email

Your software
My Mautic version is: 4.4.4, fresh install from zip file.
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

Your problem
My problem is: when creating landing page or email from existing themes delivered in the installation, the images do not show up. When uploading images, one sees their names, but no preview is available. And all the images are not displayed in the page. I have not yet managed to upload a theme made by myself to see if the problem is the same.

These errors are showing in the log: No error recorded.

Steps I have tried to fix the problem: 1. restart server 2. try different themes.

Any suggestion is really appreciated.

Are there any errors in the browser console when you open image manager?

when opening the window in my first post (by double clicking on an image), there is no error message in the browser. I checked the .php file in mautic_directory/var/log/ as well and saw no error message neither.

Could you check weather these files belong to the right user on the server?

I guess this is what you meant. Frankly speaking, now I realize this may be where to look at.

ls -l themes/
total 104
drwxr-xr-x 4 www-data www-data 4096 Oct 25 10:06 Mauve
drwxr-xr-x 4 www-data www-data 4096 Oct 25 10:06 aurora
drwxr-xr-x 3 www-data www-data 4096 Oct 25 10:06 blank
-rw-r--r-- 1 www-data www-data 5086 Oct 25 09:01 blank-big.png
-rw-r--r-- 1 www-data www-data 4035 Oct 25 09:01 blank.png
drwxr-xr-x 4 www-data www-data 4096 Oct 25 10:06 brienz
drwxr-xr-x 4 www-data www-data 4096 Oct 25 10:06 cards
drwxr-xr-x 4 www-data www-data 4096 Oct 25 10:06 coffee
drwxr-xr-x 3 www-data www-data 4096 Oct 25 10:06 confirmme
drwxr-xr-x 6 www-data www-data 4096 Oct 25 10:06 fresh-center
drwxr-xr-x 6 www-data www-data 4096 Oct 25 10:06 fresh-fixed
drwxr-xr-x 6 www-data www-data 4096 Oct 25 10:06 fresh-left
drwxr-xr-x 6 www-data www-data 4096 Oct 25 10:06 fresh-wide
drwxr-xr-x 3 www-data www-data 4096 Oct 25 10:06 goldstar
drwxr-xr-x 4 www-data www-data 4096 Nov  6 09:51 hello
drwxr-xr-x 5 www-data www-data 4096 Nov  5 07:21 myneo
drwxr-xr-x 5 www-data www-data 4096 Oct 25 10:06 nature
drwxr-xr-x 5 www-data www-data 4096 Oct 25 10:06 neopolitan
drwxr-xr-x 5 www-data www-data 4096 Oct 25 10:06 oxygen
drwxr-xr-x 4 www-data www-data 4096 Oct 25 10:06 paprika
drwxr-xr-x 5 www-data www-data 4096 Oct 25 10:06 skyline
drwxr-xr-x 4 www-data www-data 4096 Oct 25 10:06 sparse
drwxr-xr-x 5 www-data www-data 4096 Oct 25 10:06 sunday
drwxr-xr-x 3 www-data www-data 4096 Oct 25 10:06 trulypersonal
drwxr-xr-x 4 www-data www-data 4096 Oct 25 10:06 vibrant

I followed this guide

sudo find . -type f -not -perm 644 -exec chmod 644 {} +

sudo find . -type d -not -perm 755 -exec chmod 755 {} +

sudo chmod -R g+w var/cache/ var/logs/ app/config/

sudo chmod -R g+w media/files/ media/images/ translations/

sudo rm -rf var/cache/*

sudo chown -R www-data:www-data /my/path/to/mautic

I tried to install Mautic again (once with 4.4.4, once with 4.4.3) using the same procedure above. I realize that since the beginning of the installation, the images are already missing. It seems the logos are not displayed. However, when checking System Info > Files and folder permissions, all seem ok.

I am still search for a solution. Thank you for your help.

image_install

Yes, the media folder is missing all the images. If you unzip the Mautic folder on the desktop they are there, just copy them over to the /media folder.

Thank you. But I think the images are already there. I compared them with the files unzipped on the desktop. They are the same (except the owner and group)

ls -l media/images/
total 152
-rw-rw-r-- 1 www-data www-data 37373 Sep 27 08:58 apple-touch-icon.png
-rw-rw-r-- 1 www-data www-data 15995 Sep 27 08:58 avatar.png
-rw-rw-r-- 1 www-data www-data  1091 Sep 27 08:58 btn_Facebook.png
-rw-rw-r-- 1 www-data www-data   820 Sep 27 08:58 btn_GooglePlus.png
-rw-rw-r-- 1 www-data www-data  1406 Sep 27 08:58 btn_LinkedIn.png
-rw-rw-r-- 1 www-data www-data  1137 Sep 27 08:58 btn_Twitter.png
-rw-rw-r-- 1 www-data www-data 12862 Sep 27 08:58 favicon.ico
drwxrwxr-x 2 www-data www-data 12288 Sep 27 08:58 flags
-rw-rw-r-- 1 www-data www-data 24341 Sep 27 08:58 mautic_logo_db200.png
-rw-rw-r-- 1 www-data www-data  5691 Sep 27 08:58 mautic_logo_db64.png
-rw-rw-r-- 1 www-data www-data 15086 Sep 27 08:58 mautic_logo_lb200.png
drwxrwxr-x 2 www-data www-data  4096 Sep 27 08:58 mejs

The files unzipped on the desktop.

~/4.4.3/media$ ls -l images/
total 152
-rw-r--r-- 1 root root 37373 Sep 27 08:58 apple-touch-icon.png
-rw-r--r-- 1 root root 15995 Sep 27 08:58 avatar.png
-rw-r--r-- 1 root root  1091 Sep 27 08:58 btn_Facebook.png
-rw-r--r-- 1 root root   820 Sep 27 08:58 btn_GooglePlus.png
-rw-r--r-- 1 root root  1406 Sep 27 08:58 btn_LinkedIn.png
-rw-r--r-- 1 root root  1137 Sep 27 08:58 btn_Twitter.png
-rw-r--r-- 1 root root 12862 Sep 27 08:58 favicon.ico
drwxr-xr-x 2 root root 12288 Sep 27 08:58 flags
-rw-r--r-- 1 root root 24341 Sep 27 08:58 mautic_logo_db200.png
-rw-r--r-- 1 root root  5691 Sep 27 08:58 mautic_logo_db64.png
-rw-r--r-- 1 root root 15086 Sep 27 08:58 mautic_logo_lb200.png
drwxr-xr-x 2 root root  4096 Sep 27 08:58 mejs

Hi,
Any wordpress plugin blobking things on the same server? Wordfence for example?
Do you have SSL installed?
What happens if you try to load the source of the missing pucture?
Right click + copy img url, then paste it in your browser - appears?

It is a virtual machine. Nothing else is installed alongside Mautic (no wordpress). SSL certificate is used.

The image url pasted in the web browser leads to Not Found error. However, it seem to me the image file is in the directory media/images (last row in the output below).

https://my_domain.com/index.php/media/images/crofts-white.png

ls -l media/images/
total 392
-rw-rw-r-- 1 www-data www-data 37373 Oct 25 09:01 apple-touch-icon.png
-rw-rw-r-- 1 www-data www-data 15995 Oct 25 09:01 avatar.png
-rw-r--r-- 1 www-data www-data 99886 Nov  6 12:57 brienz.jpeg
-rw-rw-r-- 1 www-data www-data  1091 Oct 25 09:01 btn_Facebook.png
-rw-rw-r-- 1 www-data www-data   820 Oct 25 09:01 btn_GooglePlus.png
-rw-rw-r-- 1 www-data www-data  1406 Oct 25 09:01 btn_LinkedIn.png
-rw-rw-r-- 1 www-data www-data  1137 Oct 25 09:01 btn_Twitter.png
-rw-r--r-- 1 www-data www-data 21543 Nov  5 14:25 crofts-white.png

I found it.

The image url is wrong

https://my_domain.com/index.php/media/images/crofts-white.png

It must be without the index.php

https://my_domain.com/media/images/crofts-white.png

Is it a bug or it is due to my specific configuration? It seems that no one else has this problem apart from me, which means my installation is the problem :smiley: ?

The next question is: how can one solve this problem?

Check your paths in your local config file

/app/config/local.php

Open in txt editor, it’s pretty self explanatory from there

@techbill thank you. I don’t know how my installation ended up like this in the app/config/local.php file:

'site_url' => 'https://mydomain.com/index.php',

I changed it to

'site_url' => 'https://mydomain.com',

The problem is solved.

I learnt about the local.php this way.

2 Likes

Glad you got it sorted!

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