nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.31k stars 4.06k forks source link

"Set up templates folder" does not pull files from path specified in config.php #26503

Closed nooblag closed 3 years ago

nooblag commented 3 years ago

How to use GitHub

Steps to reproduce

  1. Set up a templates path with your own files in it and add this to config.php, e.g. 'templatesdirectory' => '/var/www/nextcloud/data/__templates'
  2. Login as user and select "Set up templates folder" from the + menu in Files
  3. Create the folder, e.g. Templates

Expected behaviour

The files in Templates should be an import of those specified in the config.php path.

Actual behaviour

The files in Templates are pulled from ./nextcloud/core/skeleton/Templates and not the path specified in config.php. The customisation is ignored.

Server configuration

Operating system: Ubuntu 18.04.5 LTS

Web server: nginx/1.14.0

Database: mysql Ver 14.14 Distrib 5.7.33, for Linux (x86_64)

PHP version: PHP 7.4.16

Nextcloud version: (see Nextcloud admin page) 21.0.1.1

Updated from an older Nextcloud/ownCloud or fresh install: Updated from 20.0.9

Where did you install Nextcloud from: nextcloud.com

Signing status:

Signing status ``` No errors have been found. ```

List of activated apps:

App list ``` Enabled: - accessibility: 1.7.0 - activity: 2.14.3 - admin_audit: 1.11.0 - calendar: 2.2.0 - cloud_federation_api: 1.4.0 - cms_pico: 1.0.14 - comments: 1.11.0 - contacts: 3.5.1 - contactsinteraction: 1.2.0 - dav: 1.17.1 - deck: 1.3.2 - documentserver_community: 0.1.9 - external: 3.8.1 - federatedfilesharing: 1.11.0 - federation: 1.11.0 - files: 1.16.0 - files_pdfviewer: 2.1.0 - files_rightclick: 1.0.0 - files_sharing: 1.13.1 - files_texteditor: 2.14.0 - files_trashbin: 1.11.0 - files_versions: 1.14.0 - files_videoplayer: 1.10.0 - firstrunwizard: 2.10.0 - integration_whiteboard: 0.0.14 - ldap_contacts_backend: 1.0.1 - ldap_write_support: 1.3.0 - logreader: 2.6.0 - lookup_server_connector: 1.9.0 - nextcloud_announcements: 1.10.0 - notifications: 2.9.0 - oauth2: 1.9.0 - onlyoffice: 6.3.0 - password_policy: 1.11.0 - photos: 1.3.0 - privacy: 1.5.0 - provisioning_api: 1.11.0 - recommendations: 1.0.0 - serverinfo: 1.11.0 - settings: 1.3.0 - sharebymail: 1.11.0 - support: 1.4.0 - survey_client: 1.9.0 - systemtags: 1.11.0 - text: 3.2.0 - theming: 1.12.0 - twofactor_backupcodes: 1.10.0 - updatenotification: 1.11.0 - user_ldap: 1.11.0 - user_status: 1.1.1 - viewer: 1.5.0 - weather_status: 1.1.0 - workflowengine: 2.3.0 Disabled: - bruteforcesettings - dashboard - encryption - files_external - files_markdown - richdocuments ```

Nextcloud configuration:

Config report ``` { "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "***REMOVED SENSITIVE VALUE***" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "templatesdirectory": "\/var\/www\/nextcloud\/data\/__templates", "dbtype": "mysql", "version": "21.0.1.1", "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "ldapIgnoreNamingRules": false, "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory", "maintenance": false, "theme": "", "loglevel": 2, "updater.release.channel": "stable", "updater.secret": "***REMOVED SENSITIVE VALUE***" } } ```

Are you using external storage, if yes which one: local/smb/sftp/... No

Are you using encryption: yes/no No

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

Client configuration

Browser: Firefox 87.0

Operating system: Windows 10

Logs

Web server error log

Web server error log ``` No errors ```

Nextcloud log (data/nextcloud.log)

Nextcloud log ``` No errors ```

Browser log

Browser log ``` No errors ```
kesselb commented 3 years ago

https://github.com/nextcloud/server/blob/63a2ea8eaeae74107aca08d4cb04d770b1d8c1b7/lib/private/Files/Template/TemplateManager.php#L258

nooblag commented 3 years ago

Okay not a bug then, but you need to update your documentation as the variable listed there says "templatesdirectory" not "templatedirectory":

https://docs.nextcloud.com/server/21/admin_manual/configuration_server/config_sample_php_parameters.html?highlight=templatesdirectory

kesselb commented 3 years ago

Okay not a bug then, but you need to update your documentation as the variable listed there says "templatesdirectory" not "templatedirectory":

Yep. Should be done by end of the week.