I can't change my NextCloud logo

NextCloud Version: 18.0
Operating system and version: CentOS 7.7
Nginx version: 1.16
PHP version: 7.3

The issue I’m facing:
I can’t change the logo: it keeps prompting saving.
Here is the screenshot https://pics.aiden.cool/image/m8D

Steps to replicate it:
Just the normal way to change the logo
Settings>Theming>Upload Logo

Is this the first time you’ve seen this error? (Y/N): YES

The output of your Nextcloud log in Admin > Logging:
{“reqId”:“FtSx4o5XRXXLnUhybPv1”,“level”:3,“time”:“2020-02-01T09:16:44+00:00”,“remoteAddr”:“206.189.148.145”,“user”:“Sakurajima”,“app”:“index”,“method”:“POST”,“url”:"/index.php/apps/theming/ajax/uploadImage",“message”:{“Exception”:“Exception”,“Message”:“Call to undefined function OCA\Theming\Controller\mime_content_type()”,“Code”:0,“Trace”:[{“file”:"/www/wwwroot/hdd.aiden.cool/lib/private/AppFramework/App.php",“line”:125,“function”:“dispatch”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->",“args”:[{“class”:“OCA\Theming\Controller\ThemingController”},“uploadImage”]},{“file”:"/www/wwwroot/hdd.aiden.cool/lib/private/AppFramework/Routing/RouteActionHandler.php",“line”:47,“function”:“main”,“class”:“OC\AppFramework\App”,“type”:"::",“args”:[“OCA\Theming\Controller\ThemingController”,“uploadImage”,{“class”:“OC\AppFramework\DependencyInjection\DIContainer”},{"_route":“theming.Theming.uploadImage”}]},{“function”:"__invoke",“class”:“OC\AppFramework\Routing\RouteActionHandler”,“type”:"->",“args”:[{"_route":“theming.Theming.uploadImage”}]},{“file”:"/www/wwwroot/hdd.aiden.cool/lib/private/Route/Router.php",“line”:299,“function”:“call_user_func”,“args”:[{“class”:“OC\AppFramework\Routing\RouteActionHandler”},{"_route":“theming.Theming.uploadImage”}]},{“file”:"/www/wwwroot/hdd.aiden.cool/lib/base.php",“line”:1008,“function”:“match”,“class”:“OC\Route\Router”,“type”:"->",“args”:["/apps/theming/ajax/uploadImage"]},{“file”:"/www/wwwroot/hdd.aiden.cool/index.php",“line”:38,“function”:“handleRequest”,“class”:“OC”,“type”:"::",“args”:[]}],“File”:"/www/wwwroot/hdd.aiden.cool/lib/private/AppFramework/Http/Dispatcher.php",“Line”:109,“Previous”:{“Exception”:“Error”,“Message”:“Call to undefined function OCA\Theming\Controller\mime_content_type()”,“Code”:0,“Trace”:[{“file”:"/www/wwwroot/hdd.aiden.cool/lib/private/AppFramework/Http/Dispatcher.php",“line”:170,“function”:“uploadImage”,“class”:“OCA\Theming\Controller\ThemingController”,“type”:"->",“args”:[]},{“file”:"/www/wwwroot/hdd.aiden.cool/lib/private/AppFramework/Http/Dispatcher.php",“line”:99,“function”:“executeController”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->",“args”:[{“class”:“OCA\Theming\Controller\ThemingController”},“uploadImage”]},{“file”:"/www/wwwroot/hdd.aiden.cool/lib/private/AppFramework/App.php",“line”:125,“function”:“dispatch”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->",“args”:[{“class”:“OCA\Theming\Controller\ThemingController”},“uploadImage”]},{“file”:"/www/wwwroot/hdd.aiden.cool/lib/private/AppFramework/Routing/RouteActionHandler.php",“line”:47,“function”:“main”,“class”:“OC\AppFramework\App”,“type”:"::",“args”:[“OCA\Theming\Controller\ThemingController”,“uploadImage”,{“class”:“OC\AppFramework\DependencyInjection\DIContainer”},{"_route":“theming.Theming.uploadImage”}]},{“function”:"__invoke",“class”:“OC\AppFramework\Routing\RouteActionHandler”,“type”:"->",“args”:[{"_route":“theming.Theming.uploadImage”}]},{“file”:"/www/wwwroot/hdd.aiden.cool/lib/private/Route/Router.php",“line”:299,“function”:“call_user_func”,“args”:[{“class”:“OC\AppFramework\Routing\RouteActionHandler”},{"_route":“theming.Theming.uploadImage”}]},{“file”:"/www/wwwroot/hdd.aiden.cool/lib/base.php",“line”:1008,“function”:“match”,“class”:“OC\Route\Router”,“type”:"->",“args”:["/apps/theming/ajax/uploadImage"]},{“file”:"/www/wwwroot/hdd.aiden.cool/index.php",“line”:38,“function”:“handleRequest”,“class”:“OC”,“type”:"::",“args”:[]}],“File”:"/www/wwwroot/hdd.aiden.cool/apps/theming/lib/Controller/ThemingController.php",“Line”:270},“CustomMessage”:"–"},“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36”,“version”:“18.0.0.10”,“id”:“5e354453ae2e8”}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

‘dbtype’ => ‘mysql’,
‘version’ => ‘18.0.0.10’,

Thank you very much for helping me.

quick noob-questions: which format does your logo-file have? have you tried different formats?

I’ve tried png svg and jpg file.

ok. one of it SHOULD work, at least (if not all).

ummm… other than that… i dunno. i thought it could have been a problem with the formatting of the logo because of

how do you run nc? dockerized? snappish? vm’d? or directly? which environment?

maybe it has something to do with: https://github.com/nextcloud/server/issues/18328 ? could you please check that out?

OK, I think I should upload the logo again in another format.
I just dropped the nc file directly into the directory of the website.

Now I can tell you that I have tried all common image formats: jpg, jpeg, png, svg and even gif.

Might be some issue with permissions.

  • Are the paths in the nextcloud directory writable to the webserver user (www-data, http or whatever the username is on your system)?

  • Is there anything similar to this in your config.php:

array (
              "path"     => OC::$SERVERROOT."/apps",
              "url"      => "/apps",
              "writable" => false,
      ),

I am having the same problem as well.

Following is the log file. Anyone can help?

Exception: Call to undefined function OCA\Theming\Controller\mime_content_type()

  1. /home/commy/lommy/lib/private/AppFramework/App.php - line 125:OC\AppFramework\Http\Dispatcher->dispatch(OCA\Theming\ … {}, “uploadImage”)
  2. /home/commy/lommy/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:OC\AppFramework\App::main(“OCA\Themin … r”, “uploadImage”, OC\AppFramew … {}, { _route: "t … "})
  3. <>OC\AppFramework\Routing\RouteActionHandler->__invoke({ _route: "t … "})
  4. /home/commy/lommy/lib/private/Route/Router.php - line 299:call_user_func(OC\AppFramew … {}, { _route: "t … "})
  5. /home/commy/lommy/lib/base.php - line 1008:OC\Route\Router->match("/apps/themi … e")
  6. /home/commy/lommy/index.php - line 38:OC::handleRequest()

Caused by Error: Call to undefined function OCA\Theming\Controller\mime_content_type()

  1. /home/commy/lommy/lib/private/AppFramework/Http/Dispatcher.php - line 170:OCA\Theming\Controller\ThemingController->uploadImage()
  2. /home/commy/lommy/lib/private/AppFramework/Http/Dispatcher.php - line 99:OC\AppFramework\Http\Dispatcher->executeController(OCA\Theming\ … {}, “uploadImage”)
  3. /home/commy/lommy/lib/private/AppFramework/App.php - line 125:OC\AppFramework\Http\Dispatcher->dispatch(OCA\Theming\ … {}, “uploadImage”)
  4. /home/commy/lommy/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:OC\AppFramework\App::main(“OCA\Themin … r”, “uploadImage”, OC\AppFramew … {}, { _route: "t … "})
  5. <>OC\AppFramework\Routing\RouteActionHandler->__invoke({ _route: "t … "})
  6. /home/commy/lommy/lib/private/Route/Router.php - line 299:call_user_func(OC\AppFramew … {}, { _route: "t … "})
  7. /home/commy/lommy/lib/base.php - line 1008:OC\Route\Router->match("/apps/themi … e")
  8. /home/commy/lommy/index.php - line 38:OC::handleRequest()