Server: Updates clears 'theme' entry in config.php

Created on 29 Nov 2018  路  4Comments  路  Source: nextcloud/server

Every time I update Nextcloud the theme entry in the config.php get cleared.

I use
'theme' => $_SERVER['HTTP_HOST'],

after an update the entry is

'theme' => '',

install and update theming needs info

Most helpful comment

You could create a new file theme.config.php in the same folder like config.php and use

return [
    'theme' => $_SERVER['HTTP_HOST']
];

this should be update save.

All 4 comments

GitMate.io thinks possibly related issues are https://github.com/nextcloud/server/issues/11038 (Updating App will enable maintenance in config.php ...), https://github.com/nextcloud/server/pull/11240 (Consider openssl settings from config.php), https://github.com/nextcloud/server/pull/11047 (Fix typo in config.sample.php), https://github.com/nextcloud/server/issues/1358 (config.php - Disable Remember Login), and https://github.com/nextcloud/server/pull/10744 (Update help.php).

I don't think you're "allowed" to use vars in config.php because that file is re-written by Nextcloud when system config changes. cc @MorrisJobke

You could create a new file theme.config.php in the same folder like config.php and use

return [
    'theme' => $_SERVER['HTTP_HOST']
];

this should be update save.

With the solution of @danielkesselberg the theme is always also fetched from this additional file and will not be vanished on update.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ThomasLeister picture ThomasLeister  路  3Comments

mfechner picture mfechner  路  3Comments

williambargent picture williambargent  路  3Comments

mama21mama picture mama21mama  路  3Comments

brylie picture brylie  路  3Comments