Can't download any themes and can't use new themes

Your software
My Mautic version is:3.2.1
My PHP version is: PHP Version 7.3.27-1~deb10u1
My Database type and version is: MariaDB

Your problem
My problem is: New themes install but don’t work. Existing themes do not download

These errors are showing in the log:

[2022-01-12 19:25:57] mautic.CRITICAL: Uncaught PHP Exception UnexpectedValueException: “The Response content must be a string or object implementing __toString(), “boolean” given.” at /var/www/html/vendor/symfony/http-foundation/Response.php line 399 {“exception”:"[object] (UnexpectedValueException(code: 0): The Response content must be a string or object implementing __toString(), “boolean” given. at /var/www/html/vendor/symfony/http-foundation/Response.php:399)"}
[2022-01-12 19:26:07] mautic.WARNING: PHP Warning - ZipArchive::close(): Failure to create temporary file: Permission denied - in file /var/www/html/app/bundles/CoreBundle/Helper/ThemeHelper.php - at line 560 {“themeName”:“aurora”,“themePath”:"/var/www/html/themes/aurora",“tmpPath”:"/var/www/html/var/cache/prod/tmp_aurora.zip",“zipper”:"[object] (ZipArchive: {“status”:12,“statusSys”:13,“numFiles”:28,“filename”:"/var/www/html/var/cache/prod/tmp_aurora.zip",“comment”:""})",“finder”:"[object] (Symfony\Component\Finder\Finder: {})",“archive”:true,“file”:"[object] (Symfony\Component\Finder\SplFileInfo: /var/www/html/themes/aurora/html/email.html.twig)",“filePath”:"/var/www/html/themes/aurora/html/email.html.twig",“localPath”:“html/email.html.twig”}
[2022-01-12 19:26:07] mautic.WARNING: PHP Warning - filesize(): stat failed for /var/www/html/var/cache/prod/tmp_aurora.zip - in file /var/www/html/app/bundles/CoreBundle/Controller/ThemeController.php - at line 167 {“themeName”:“aurora”,“themeHelper”:"[object] (Mautic\CoreBundle\Helper\ThemeHelper: {})",“flashes”:,“error”:false,“zipPath”:"/var/www/html/var/cache/prod/tmp_aurora.zip",“response”:"[object] (Symfony\Component\HttpFoundation\Response: HTTP/1.0 200 OK\r\nCache-Control: no-cache, private\r\nContent-Type: application/octet-stream\r\nDate: Wed, 12 Jan 2022 19:26:07 GMT\r\n\r\n)"}
[2022-01-12 19:26:07] mautic.WARNING: PHP Warning - file_get_contents(/var/www/html/var/cache/prod/tmp_aurora.zip): failed to open stream: No such file or directory - in file /var/www/html/app/bundles/CoreBundle/Controller/ThemeController.php - at line 175 {“themeName”:“aurora”,“themeHelper”:"[object] (Mautic\CoreBundle\Helper\ThemeHelper: {})",“flashes”:,“error”:false,“zipPath”:"/var/www/html/var/cache/prod/tmp_aurora.zip",“response”:"[object] (Symfony\Component\HttpFoundation\Response: HTTP/1.0 200 OK\r\nCache-Control: no-cache, private\r\nContent-Disposition: attachment;filename=“aurora.zip”\r\nContent-Length: \r\nContent-Type: application/octet-stream\r\nDate: Wed, 12 Jan 2022 19:26:07 GMT\r\n\r\n)",“stream”:0}
[2022-01-12 19:26:07] mautic.CRITICAL: Uncaught PHP Exception UnexpectedValueException: “The Response content must be a string or object implementing __toString(), “boolean” given.” at /var/www/html/vendor/symfony/http-foundation/Response.php line 399 {“exception”:"[object] (UnexpectedValueException(code: 0): The Response content must be a string or object implementing __toString(), “boolean” given. at /var/www/html/vendor/symfony/http-foundation/Response.php:399)"}
[2022-01-12 19:26:17] mautic.WARNING: PHP Warning - ZipArchive::close(): Failure to create temporary file: Permission denied - in file /var/www/html/app/bundles/CoreBundle/Helper/ThemeHelper.php - at line 560 {“themeName”:“sunday”,“themePath”:"/var/www/html/themes/sunday",“tmpPath”:"/var/www/html/var/cache/prod/tmp_sunday.zip",“zipper”:"[object] (ZipArchive: {“status”:12,“statusSys”:13,“numFiles”:15,“filename”:"/var/www/html/var/cache/prod/tmp_sunday.zip",“comment”:""})",“finder”:"[object] (Symfony\Component\Finder\Finder: {})",“archive”:true,“file”:"[object] (Symfony\Component\Finder\SplFileInfo: /var/www/html/themes/sunday/html/email.html.twig)",“filePath”:"/var/www/html/themes/sunday/html/email.html.twig",“localPath”:“html/email.html.twig”}
[2022-01-12 19:26:17] mautic.WARNING: PHP Warning - filesize(): stat failed for /var/www/html/var/cache/prod/tmp_sunday.zip - in file /var/www/html/app/bundles/CoreBundle/Controller/ThemeController.php - at line 167 {“themeName”:“sunday”,“themeHelper”:"[object] (Mautic\CoreBundle\Helper\ThemeHelper: {})",“flashes”:,“error”:false,“zipPath”:"/var/www/html/var/cache/prod/tmp_sunday.zip",“response”:"[object] (Symfony\Component\HttpFoundation\Response: HTTP/1.0 200 OK\r\nCache-Control: no-cache, private\r\nContent-Type: application/octet-stream\r\nDate: Wed, 12 Jan 2022 19:26:17 GMT\r\n\r\n)"}
[2022-01-12 19:26:17] mautic.WARNING: PHP Warning - file_get_contents(/var/www/html/var/cache/prod/tmp_sunday.zip): failed to open stream: No such file or directory - in file /var/www/html/app/bundles/CoreBundle/Controller/ThemeController.php - at line 175 {“themeName”:“sunday”,“themeHelper”:"[object] (Mautic\CoreBundle\Helper\ThemeHelper: {})",“flashes”:,“error”:false,“zipPath”:"/var/www/html/var/cache/prod/tmp_sunday.zip",“response”:"[object] (Symfony\Component\HttpFoundation\Response: HTTP/1.0 200 OK\r\nCache-Control: no-cache, private\r\nContent-Disposition: attachment;filename=“sunday.zip”\r\nContent-Length: \r\nContent-Type: application/octet-stream\r\nDate: Wed, 12 Jan 2022 19:26:17 GMT\r\n\r\n)",“stream”:0}
[2022-01-12 19:26:17] mautic.CRITICAL: Uncaught PHP Exception UnexpectedValueException: “The Response content must be a string or object implementing __toString(), “boolean” given.” at /var/www/html/vendor/symfony/http-foundation/Response.php line 399 {“exception”:"[object] (UnexpectedValueException(code: 0): The Response content must be a string or object implementing __toString(), “boolean” given. at /var/www/html/vendor/symfony/http-foundation/Response.php:399)"}
[2022-01-12 19:34:42] mautic.WARNING: PHP Warning - ZipArchive::close(): Failure to create temporary file: Permission denied - in file /var/www/html/app/bundles/CoreBundle/Helper/ThemeHelper.php - at line 560 {“themeName”:“html_plain_text”,“themePath”:"/var/www/html/themes/html_plain_text",“tmpPath”:"/var/www/html/var/cache/prod/tmp_html_plain_text.zip",“zipper”:"[object] (ZipArchive: {“status”:12,“statusSys”:13,“numFiles”:7,“filename”:"/var/www/html/var/cache/prod/tmp_html_plain_text.zip",“comment”:""})",“finder”:"[object] (Symfony\Component\Finder\Finder: {})",“archive”:true,“file”:"[object] (Symfony\Component\Finder\SplFileInfo: /var/www/html/themes/html_plain_text/html/email.html.twig)",“filePath”:"/var/www/html/themes/html_plain_text/html/email.html.twig",“localPath”:“html/email.html.twig”}
[2022-01-12 19:34:42] mautic.WARNING: PHP Warning - filesize(): stat failed for /var/www/html/var/cache/prod/tmp_html_plain_text.zip - in file /var/www/html/app/bundles/CoreBundle/Controller/ThemeController.php - at line 167 {“themeName”:“html_plain_text”,“themeHelper”:"[object] (Mautic\CoreBundle\Helper\ThemeHelper: {})",“flashes”:,“error”:false,“zipPath”:"/var/www/html/var/cache/prod/tmp_html_plain_text.zip",“response”:"[object] (Symfony\Component\HttpFoundation\Response: HTTP/1.0 200 OK\r\nCache-Control: no-cache, private\r\nContent-Type: application/octet-stream\r\nDate: Wed, 12 Jan 2022 19:34:42 GMT\r\n\r\n)"}
[2022-01-12 19:34:42] mautic.WARNING: PHP Warning - file_get_contents(/var/www/html/var/cache/prod/tmp_html_plain_text.zip): failed to open stream: No such file or directory - in file /var/www/html/app/bundles/CoreBundle/Controller/ThemeController.php - at line 175 {“themeName”:“html_plain_text”,“themeHelper”:"[object] (Mautic\CoreBundle\Helper\ThemeHelper: {})",“flashes”:,“error”:false,“zipPath”:"/var/www/html/var/cache/prod/tmp_html_plain_text.zip",“response”:"[object] (Symfony\Component\HttpFoundation\Response: HTTP/1.0 200 OK\r\nCache-Control: no-cache, private\r\nContent-Disposition: attachment;filename=“html_plain_text.zip”\r\nContent-Length: \r\nContent-Type: application/octet-stream\r\nDate: Wed, 12 Jan 2022 19:34:42 GMT\r\n\r\n)",“stream”:0}
[2022-01-12 19:34:42] mautic.CRITICAL: Uncaught PHP Exception UnexpectedValueException: “The Response content must be a string or object implementing __toString(), “boolean” given.” at /var/www/html/vendor/symfony/http-foundation/Response.php line 399 {“exception”:"[object] (UnexpectedValueException(code: 0): The Response content must be a string or object implementing __toString(), “boolean” given. at /var/www/html/vendor/symfony/http-foundation/Response.php:399)"}
[2022-01-12 19:35:22] mautic.CRITICAL: Uncaught PHP Exception RuntimeException: “Unable to write in the cache directory (/var/www/html/app/…/var/tmp/twig/18).” at /var/www/html/vendor/twig/twig/src/Cache/FilesystemCache.php line 61 {“exception”:"[object] (RuntimeException(code: 0): Unable to write in the cache directory (/var/www/html/app/…/var/tmp/twig/18). at /var/www/html/vendor/twig/twig/src/Cache/FilesystemCache.php:61)"}
[2022-01-12 19:36:22] mautic.CRITICAL: Uncaught PHP Exception RuntimeException: “Unable to write in the cache directory (/var/www/html/app/…/var/tmp/twig/18).” at /var/www/html/vendor/twig/twig/src/Cache/FilesystemCache.php line 61 {“exception”:"[object] (RuntimeException(code: 0): Unable to write in the cache directory (/var/www/html/app/…/var/tmp/twig/18). at /var/www/html/vendor/twig/twig/src/Cache/FilesystemCache.php:61)"}
[2022-01-12 19:41:32] mautic.CRITICAL: Uncaught PHP Exception RuntimeException: “Unable to write in the cache directory (/var/www/html/app/…/var/tmp/twig/e1).” at /var/www/html/vendor/twig/twig/src/Cache/FilesystemCache.php line 61 {“exception”:"[object] (RuntimeException(code: 0): Unable to write in the cache directory (/var/www/html/app/…/var/tmp/twig/e1). at /var/www/html/vendor/twig/twig/src/Cache/FilesystemCache.php:61)"}
[2022-01-12 20:17:02] mautic.CRITICAL: Uncaught PHP Exception RuntimeException: “Unable to write in the cache directory (/var/www/html/app/…/var/tmp/twig/18).” at /var/www/html/vendor/twig/twig/src/Cache/FilesystemCache.php line 61 {“exception”:"[object] (RuntimeException(code: 0): Unable to write in the cache directory (/var/www/html/app/…/var/tmp/twig/18). at /var/www/html/vendor/twig/twig/src/Cache/FilesystemCache.php:61)"}
[2022-01-12 20:17:27] mautic.CRITICAL: Uncaught PHP Ex

Steps I have tried to fix the problem: Have cleared cache with : /var/www/html/bin/console cache:clear which ran fine.

The 2 themes I was wanting to try are:

https://cdn.devsrealm.com/wp-content/uploads/2020/12/html_plain_text.zip

My son is the server admin and he added a swap file as clearing cache command initially gave out of memory error. After swap file setup clear cache ran without error.

Any ideas please?

Thank you

Paul

I saw couple of permission errors in the log. This happens very often if the linux user running mautic doesn’t have the access to certain folders. Plz ask your son to chown the directory, run the cache clearing command as the user who runs Mautic and try again.

Thank you! That does seem to have worked. I can now use the new themes and download themes. Thanks again.

Hi Joey:)

I’m new here. I read a couple of issues, but I couldn’t find the solution. I’m trying to upload / download a theme but I get error. could it be connected to the “.htaccess” file? I created a new one in order for mautic to work and not give me an error. I hope it’s ok that I ask you here…

Hi, it really depends. What is the error? :wink:

1 Like

ty for the reply Joey:)

so when I try to upload to Mautic a theme that I changed its name in the config.json to “Monday”, I get this error: mautic.core.ziparchive.not.installed

when I try to download one of the Mautic themes from the list, I get this error:

“Uh oh! I think I broke it. If I do it again, please report me to the system administrator!” 500 Internal Server Error

I think that I need to add that I downloaded Mautic from the Website and copied the files to my hosting, created a db and an email. at first when I went to the subdomain that Mautic was on, I got an error. then with the support of my Hosting we created a new .htaccess file, because the one that came in the zip file was creating an error because all of the restrictions.

I hope that makes sense

Your install is missing the php zip extension in my opinion.

1 Like

Sorry, I’m not sure I understand. U mean the extension of the zip file?

Screenshot 2023-12-29 at 19.50.56

also do u know maybe why I get an error when trying to download a theme from Mautic?

I get this error:

thank you for your replys:)

No, I mean the PHP extension, that you added, when you installed the environment (I hope you did :slight_smile: )
for Ubuntu and php 7.4 it would look like:

apt install apache2 libapache2-mod-php7.4 php7.4 unzip php7.4-xml php7.4-mysql php7.4-imap php7.4-zip php7.4-intl php7.4-curl php7.4-gd php7.4-mbstring php7.4-bcmath ntp -y

1 Like

HI joey:)

this is my php extension, do u think it’s ok?

my php version is 7.4

btw, when I tru to upload the theme to Mautic I get that error, but the zip file is uploaded to my file manager (unzipped)…

Could you plz click in ‘zip’ as well?

1 Like

make sense lol :see_no_evil:

unfortunately I get the same error still, and the zip file is uploaded but not unzipped…

Sorry, I’m not sure. I don’t use shared servers due to their limitations, and situation like this. But I’m sure someone else will chime in.

1 Like

I hope so, ty anyways:)