nickian / mautic-whitelabeler

Easily change the logos, colors and company name in the Mautic user interface.
275 stars 112 forks source link

Stuck on loading screen after hit save #145

Closed gndamiao closed 8 months ago

gndamiao commented 1 year ago

I think i've made everything right, but when I change anything at white labeler and click save, the screen get stucked on loading gif screen and dind't save the changes.

I take a look at the log: [2023-01-13 01:49:43] mautic.CRITICAL: Uncaught PHP Exception Swift_RfcComplianceException: "Address set in PathHeader does not comply with addr-spec of RFC 2822." at /var/www/html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 150 {"exception":"[object] (Swift_RfcComplianceException(code: 0): Address set in PathHeader does not comply with addr-spec of RFC 2822. at /var/www/html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php:150)"} {"hostname":"c2073f1d3273","pid":23429} [2023-01-13 01:50:08] mautic.NOTICE: PHP Notice - Undefined offset: 1 - in file /var/www/html/app/bundles/EmailBundle/Helper/MailHelper.php - at line 1961 {"idHash":null,"monitoredEmail":false,"settings":{"address":"","host":"imap.zoho.com","port":"993","encryption":"/ssl","user":"gustavo@tropico.me","password":"redacted","use_attachments":"","folder":""},"email":""} {"hostname":"c2073f1d3273","pid":23429} [2023-01-13 01:50:08] mautic.CRITICAL: Uncaught PHP Exception Swift_RfcComplianceException: "Address set in PathHeader does not comply with addr-spec of RFC 2822." at /var/www/html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 150 {"exception":"[object] (Swift_RfcComplianceException(code: 0): Address set in PathHeader does not comply with addr-spec of RFC 2822. at /var/www/html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php:150)"} {"hostname":"c2073f1d3273","pid":23429} [2023-01-13 01:59:08] mautic.NOTICE: PHP Notice - Undefined offset: 1 - in file /var/www/html/app/bundles/EmailBundle/Helper/MailHelper.php - at line 1961 {"idHash":null,"monitoredEmail":false,"settings":{"address":"","host":"imap.zoho.com","port":"993","encryption":"/ssl","user":"gustavo@tropico.me","password":"redacted","use_attachments":"","folder":""},"email":""} {"hostname":"c2073f1d3273","pid":23430} [2023-01-13 01:59:08] mautic.CRITICAL: Uncaught PHP Exception Swift_RfcComplianceException: "Address set in PathHeader does not comply with addr-spec of RFC 2822." at /var/www/html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php line 150 {"exception":"[object] (Swift_RfcComplianceException(code: 0): Address set in PathHeader does not comply with addr-spec of RFC 2822. at /var/www/html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php:150)"} {"hostname":"c2073f1d3273","pid":23430}

Captura de Tela 2023-01-13 às 12 58 50

Does someone has the same issue? Could you help me, please?

Thanks.

nickian commented 1 year ago

The messages in the log look like they are from general Mautic errors and warnings, not the whitelabeler. Be careful when you post log messages. You included your email username and password. I edited the comment and redacted the password.

There's not much I can do without seeing a specific error that is relevant to the whitelabeler.

Bamstian commented 1 year ago

There's not much I can do without seeing a specific error that is relevant to the whitelabeler.

I have the same issue. When i hit "whitelabel" i got an error as well as when i hit save:

Error "whitelabel"
Fatal error: Uncaught Error: Call to undefined function imagecreatefrompng() in /var/www/html/mautic-whitelabeler/whitelabeler.php:416 Stack trace:

0 /var/www/html/mautic-whitelabeler/whitelabeler.php(498): Whitelabeler->imageResize(250, '/tmp/phpsTac5w', '/var/www/html/m...')

1 /var/www/html/mautic-whitelabeler/index.php(327): Whitelabeler->replaceImages('/var/www/html', 'https://m.mento...', '2.16.2', '/tmp/phpsTac5w', '150', Array, '/tmp/phpjuN5Av', '250', Array, '/tmp/phpeHI26t')

2 {main}

thrown in /var/www/html/mautic-whitelabeler/whitelabeler.php on line 416

Error save: Uncaught TypeError: Cannot read properties of undefined (reading '0') at Object.success (whitelabeler.js:915:47) at i (jquery-3.1.1.min.js:2:27983) at Object.fireWith [as resolveWith] (jquery-3.1.1.min.js:2:28749) at A (jquery-3.1.1.min.js:4:14203) at XMLHttpRequest. (jquery-3.1.1.min.js:4:16491) success @ whitelabeler.js:915 i @ jquery-3.1.1.min.js:2 fireWith @ jquery-3.1.1.min.js:2 A @ jquery-3.1.1.min.js:4 (anonymous) @ jquery-3.1.1.min.js:4 load (async) send @ jquery-3.1.1.min.js:4 ajax @ jquery-3.1.1.min.js:4 saveConfigJson @ whitelabeler.js:854 (anonymous) @ whitelabeler.js:966 dispatch @ jquery-3.1.1.min.js:3 q.handle @ jquery-3.1.1.min.js:3

nickian commented 1 year ago

Call to undefined function imagecreatefrompng() This is a PHP error. It's not finding the GD library function. Make sure you have installed and enabled the GD extension for your version of PHP.

Bamstian commented 1 year ago

Call to undefined function imagecreatefrompng() This is a PHP error. It's not finding the GD library function. Make sure you have installed and enabled the GD extension for your version of PHP.

Thank you! I am using docker for this project and was on 2.x 🙄

Now I am on 4.10 but get an 403-error even with www-data as owner of the folder, as any other folders in this directory.

Do you have any tips or best practices for that?

nickian commented 1 year ago

Do you have the whitelabeler in the root of the Mautic folder? If so, it's probably the .htaccess file preventing access to the directory. If this is the case, you can temporarily rename the .htaccess file, run the whitelabeler in the browser, then set the file back to .htaccess.

Bamstian commented 1 year ago

Yes I do, but I think it has something to with my Docker-Setup. I lost lots of time during my tests and want to test it on a fresh server without docker and with composer-installation of Mautic. Then it may work. I will get back to you here.