Custom Theme not showing up

Hello there,

I am having issues enabling custom theme that has been created prior and was running successfully on a different server.

Steps to reproduce

  1. Theme was copied from a different server to /var/www/owncloud/apps-custom directory (same directory as was used on a previous server)
  2. config.php and info.xml files have been changed accordingly and double or tripple check was performed to see that all directories and filenames would match.
  3. After logging in and searching Disabled Apps section the theme cannot be found.
  4. After additionally following Theming Instructions from OwnCloud Documentation to try to install a fresh custom theme through Terminal in the apps-external directory nothing shows up either.
  5. sudo service apache2 restart command does nothing either

Expected behaviour

After copying the theme to apps-custom directory and applying changes to config.php and info.xml the theme should pop up in the Disable Apps section and we should be able to use it. Note that the theme was used on a different server without any issues.
Following instructions to install a new theme through Terminal should result into giving new theme as well.

Actual behaviour

Neither themes show up in Disabled or Enabled Apps section. The feeling is as config.php file would not be used by ownCloud as it did not exist.

Server configuration

Operating system: Ubuntu 22.04

Web server: Apache 2

Database: MySQL

PHP version: 7.4

ownCloud version: 10.13.2

Updated from an older ownCloud or fresh install: Fresh on both servers

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results into https://gist.github.com/ and puth the link here.

The content of config/config.php:

<?php
$CONFIG = array (
  'trusted_domains' => 
  array (
    0 => 'cloud.name.com',
    1 => '1.1.1.1',
    2 => '2.2.2.2',
    3 => 'localhost',
  ),
  'integrity.ignore.missing.app.signature' => [
      'nameofthetheme',
  ],
'apps_paths' => [
	0 =>
		[
			'path' => OC::$SERVERROOT.'/apps',
			'url' => '/apps',
			'writable' => false,
		],
	1 =>
		[
			'path' => OC::$SERVERROOT.'/apps-external',
			'url' => '/apps-external',
			'writable' => true,
		],
	2 =>
		[
			'path' => OC::$SERVERROOT.'/apps-custom',
			'url' => '/apps-custom',
			'writable' => true,
		],
  ],
  'installed' => true,
);

List of activated apps: Whatever comes with a fresh install

Are you using external storage, if yes which one: local/smb/sftp/… None

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/… No

Client configuration

Browser: Firefox

Operating system: Ubuntu 22.04

I assume, you put your theme at the wrong location. The default location is apps-external rather than apps-custom. However, this can be adjusted in the config.php:

array (
  0 => 
  array (
    'path' => '/var/www/owncloud/apps',
    'url' => '/apps',
    'writable' => false,
  ),
  1 => 
  array (
    'path' => '/var/www/owncloud/apps-external',
    'url' => '/apps-external',
    'writable' => true,
  ),
),
1 Like

No, we tried both directiories. Even the default custom theme that we installed through Terminal by official OwnCloud tutorial and should install default custom theme in apps-external (and it does, it does show up there), does not do the trick.

Is there a way to check if config.php is being read at all?

UPDATE:
It sure looks like config.php is not working correctly. Also trusted_domains are not being read. This is the full code (minus sensitive data).

'trusted_domains' => [
    0 => 'cloud.name.com',
    1 => '192.168.xxx.xxx',
    2 => 'static public IP',
    3 => 'localhost',
],
  
 'integrity.ignore.missing.app.signature' => [
      'themename',
],
  
'apps_paths' => [
	0 =>
		[
			'path' => '/var/www/owncloud/apps',
			'url' => '/apps',
			'writable' => false,
		],
	1 =>
		[
			'path' => '/var/www/owncloud/apps-external',
			'url' => '/apps-external',
			'writable' => true,
		],
	1 =>
		[
			'path' => '/var/www/owncloud/apps-custom',
			'url' => '/apps-custom',
			'writable' => true,
		],
  ],

Did you notice that you have 2 identical indices in apps_paths?

EDIT: I think you should use the array() function, rather than the angular brackets.

1 Like

Yes, so we have noticed that there were 2 idencies in apps_paths.

However, the issue was that for some reason we were editing /var/www/owncloud, but there was another instance in /var/www/html/owncloud. Since this was a fresh Ubuntu install with only one instance of OwnCloud installed, I find this a bit strange :thinking:

Anyway, thing is reasolved now, thanks!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.