Can't upload logo

Hi,

I’ve just installed a new instance from SuiteCRM, and didn’t upload the logo at installation time, so I tried to do it later but it never finish to upload the image.

So, I try with another new instance, this time I tried to upload the logo during the installation process, but it also got stuck several minutes and never finish, no error message, no log message from server side.

All I see is on browser console:

Refused to display ā€˜https://domain.com/demo/install.php?sugar_body_only=1&uploadLogoFrame=1’ in a frame because it set ā€˜X-Frame-Options’ to ā€˜deny’.
Refused to display ā€˜https://domain.com/demo/install.php?sugar_body_only=1&uploadLogo=1&callback=uploadLogoCallback’ in a frame because it set ā€˜X-Frame-Options’ to ā€˜deny’.

Anyone know what may be happening?

Thanks.

David

Hi!

Which browser, which SuiteCRM version, which web server?

Thanks

Hi

I’m using Chrome Version 63.0.3239.84 (Build oficial) (64 bits), and the server use Apache httpd-2.4.6-67.el7.centos.6.x86_64, on CentOS Linux release 7.4.1708 (Core)

Same behavior on Firefox 40.0.3

Use Internet Explorer is a blasphemy a sin, so I never use it.

Thanks.

David

I’d never heard of this option, but from a quick Google I gather you might have a Web srever setting for X-Frame-Options that you need to relax a bit.

Try to find that term in your Web server settings or on any .htaccess file.

Hi,

I tried to upload the logo to a 7.9.8 instance after installation process, go to: Admin->System Settings section ā€˜Current Logo’, I select the file, then a ā€˜loading’ icon appears to represent the logo upload, but nothing happend, the icon never disappears and the logo is never uploaded, this time I see some other error messages:

Uncaught TypeError: Cannot read property ā€˜forQuotes’ of undefined
at Object.upload (index.php?module=Configurator&action=EditView:1468)
at HTMLIFrameElement.q (sugar_grp1_yui.js?v=nRZIoTyDvDIeQxfobMbJaw:55)
at HTMLIFrameElement.n (sugar_grp1_yui.js?v=nRZIoTyDvDIeQxfobMbJaw:25)
upload @ index.php?module=Configurator&action=EditView:1468
q @ sugar_grp1_yui.js?v=nRZIoTyDvDIeQxfobMbJaw:55
n @ sugar_grp1_yui.js?v=nRZIoTyDvDIeQxfobMbJaw:25

These messages make any sense to you?

I’ve add an attachment with an screenshot of the behavior.

Sorry, that error doesn’t tell me anything, I’m afraid…

Sometimes problems uploading are caused by bad Linux permissions. If SuiteCRM can’t write the file to disk, the upload fails.

Can you check the ownership and permissions in your ā€œuploadā€ directory?

Hi,

These are the permisions:

drwxrwxr-x. 2 apache apache 24 Dec 20 04:10 upload

Obviously I had executed:

chown -R apache:apache .
chmod -R 755 .
chmod -R 775 cache custom modules themes data upload config_override.php

since the begininig.

I’m wondering may be something related to selinux? Will check and let you know.

Thanks.

David

Hi,

No, nothing, I’d disable selinux, but the problem persist.

I will explore other options.

Hi everybody,

Finally I found the solution!

That X-Frame-Options parameter was preventing the logo upload to work, I take a look to the documentation of that property/option at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options

Then I search where was X-Frame-Options on my HTTP server configuration usig egrep:

[root@server ~]# egrep -lir X-Frame-Options /etc/httpd/
/etc/httpd/conf.d/ssl.conf

Then I edited the file:

[root@server ~]# vim /etc/httpd/conf.d/ssl.conf

Changed the value to SAMEORIGIN but leave the original line just for audit purposes

#Header always set X-Frame-Options DENY # original line
Header always set X-Frame-Options SAMEORIGIN

Then restart HTTP service

[root@server ~]# systemctl restart httpd

Then the logo upload works.

Thanks @pgr for your help anyway.

Hope this help someone else.

David

This is what I told you to do in one of my first posts above

Anyway I’m glad you solved it :slight_smile:

Yes pgr it’s right, but I don’t understand it until I read mozilla doc, I tought that was something in the browser and I have no .htaccess file, so I didn’t find useful to change some browser property, then I realize that was a http server property at then make sense, thanks for your help.