Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom theme template file doesn't override the existing standard file #11585

Closed
maccarib opened this issue Oct 3, 2018 · 10 comments
Closed

Comments

@maccarib
Copy link

maccarib commented Oct 3, 2018

Steps to reproduce

  1. Place a custom template file in the path /themes/<mytheme>/apps/<myapp>/templates
  2. Example: copy the standard calendar colorpick from apps/calendar/templates/colorpicker.html to /themes/<mytheme>/apps/tasks/templates/colorpicker.html
  3. Reload the tasks app page. No changes will be seen.
  4. When I delete the standard tasks colorpicker, no colorpicker wil be shown at all, meaning that definitely the one in the templates folder is being ignored. On the other hand, when I copy the calendar-colorpicker.html to the standard folder apps/tasks/templates/colorpicker.html changes can be seen

Expected behaviour

Following https://docs.nextcloud.com/server/14/developer_manual/core/theming.html it should be possible to override template files. This doesn't seem to be the case.

Actual behaviour

Nothing. See steps to reproduce

Server configuration

Operating system: Debian 3.16.56-1

Web server: Apache 2.0

Database: MySQL

PHP version: 7.2.8

Nextcloud version: 13.0.6/14.0.1

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from:

Signing status:
No errors have been found.

List of activated apps:
files
activities
galery
contacts
calendar
rainloop
tasks

Nextcloud configuration:

Config report '', 'passwordsalt' => '', 'datadirectory' => '/home/www//data', 'dbtype' => 'mysql', 'version' => '13.0.6.1', 'dbname' => '', 'dbhost' => 'localhost:3306', 'dbtableprefix' => 'nc_', 'dbuser' => '', 'dbpassword' => '!', 'filesystem_check_changes' => 1, 'installed' => true, 'logfile' => '/data/nextcloud.log', 'loglevel' => '1', 'log_query' => false, 'maintenance' => false, 'theme' => '', 'trusted_domains' => array ( ), 'mail_from_address' => '', 'mail_smtpmode' => 'php', 'mail_domain' => '.net', 'secret' => '', 'appstoreenabled' => true, 'appstoreurl' => 'http://api.apps.owncloud.com/v1', 'overwrite.cli.url' => '', );
### Client configuration **Browser:** Firefox, Opera, Chrome
@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #9529 (Template file), #9417 (Custom theme architecture: Settings menu icons not being overridden by theme SVGs), #8908 (copymove can not overwrite existing files), #6799 (search/results.css not overriding from custom theme), and #5921 (Suggestion: Include custom JS and custom template files in example theme).

@violoncelloCH
Copy link
Member

you need to specify your template in your config.php

@maccarib
Copy link
Author

maccarib commented Oct 8, 2018

That's clear. My template is defined (see config-Parameters in my first post) and my css-adjustments work. It's just that this (first) custom html-template file is being ignored

@violoncelloCH
Copy link
Member

violoncelloCH commented Oct 8, 2018

I am reading this line in your config above:

'theme' => '',

So have you really specifie it as explained in the documentation you qoted?

@maccarib
Copy link
Author

maccarib commented Oct 9, 2018

You read that because I've replaced my theme name in a placeholder-like manner, that is '<mytheme>' As this editor here seemingly doesn't escape those symbols properly you don't see my entry in the 'theme'-variable. I've entered the symbols in html entity codes to be clear now, whereas in my initial code I've used 'greater than' and 'smaller than' directly. But in case you want to check, it's still in the source of my initial post.

As I've mentionned my css theme adjustments function properly, so the theming itself is valid.

@violoncelloCH
Copy link
Member

Ahh, I'm sorry about that

@maccarib
Copy link
Author

maccarib commented Oct 9, 2018

Nevermind! It still might be that I've just done or missed something stupid ;-)

@violoncelloCH
Copy link
Member

have you tried running sudo -u www-data php occ maintenance:theme:update? maybe this helps...

@maccarib
Copy link
Author

No, I haven't tried before, but now. There's no change in behavior. NC only reacts on changes in den app's standard folders.

@juliusknorr
Copy link
Member

The colorpicker template by the tasks app is not using the Nextcloud template loading but loaded in the angular app itself, therefore it doesn't respect your new template file in the theme folder. This is something the tasks app would need to add support for, so I'd suggest you open an issue in the tasks repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants