[SOLVED (kind of, partial workaround)] No template picker while creating new file (office, whiteboard, md etc.) despite well-populated templates folder

This seems to affect nextcloud instances that I initially set up before the templates mechanism was introduced. (of course, I since updated them to the latest version).

By contrast, I also have a fresh Nextcloud AIO instance where when choosing to create a new whiteboard or office document or markup text file, I am presented with a template picker.

The same does not happen with the old nextcloud installations I manage. There, when I choose to create a new whiteboard or office document or markup text file, I see an empty canvas.

I am currently migrating a nextcloud instance to AIO following this recipe, and here again, when I choose to create a new whiteboard or office document or markup text file, I see no template picker. What could be the reason? There are very few configuration options in the backend and nothing seems to be related to this issue. Does anyone have an idea? Thanks!!!

UPDATE: I’ve found, what looks like a related bug report on Github, although with very few details.

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 31.0.4
  • Operating system and version (e.g., Ubuntu 24.04):
    • Debian Bookworm
  • Web server and version (e.g, Apache 2.4.25):
    • 2.4.62
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • Same, 2.4.62
  • PHP version (e.g, 8.3):
    • 8.2
  • Is this the first time you’ve seen this error? (Yes / No):
    • no
  • When did this problem seem to first start?
    • when I first installed the app
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Both, fails to work on native and migrated to AIO, works on fresh aio
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • no

Summary of the issue you are facing:

No template picker when creating new whiteboard

Steps to replicate it (hint: details matter!):

  1. install whiteboard app and configure server
  2. Choose “new whiteboard”

Log entries

[nothing related to the whiteboard app]

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

NOTHING, ZERO LOG ENTRIES WHILE I CREATE A NEW WHITEBOARD```

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

UNRELATED TO WEB BROWSER

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

AGAIN; THIS IS UNRELATED

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

{
    "system": {
        "one-click-instance": true,
        "one-click-instance.user-limit": 100,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "check_data_directory_permissions": false,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "overwritehost": "migrate.enip.eu",
        "overwriteprotocol": "https",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "migrate.enip.eu"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "31.0.4.1",
        "overwrite.cli.url": "https:\/\/migrate.enip.eu\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "default_phone_region": "DE",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "updatedirectory": "\/nc-updater",
        "loglevel": 2,
        "app_install_overwrite": [
            "nextcloud-aio"
        ],
        "log_type": "file",
        "logfile": "\/var\/www\/html\/data\/nextcloud.log",
        "log_rotate_size": 10485760,
        "log.condition": {
            "apps": [
                "admin_audit"
            ]
        },
        "preview_max_x": 2048,
        "preview_max_y": 2048,
        "jpeg_quality": 60,
        "enabledPreviewProviders": {
            "1": "OC\\Preview\\Image",
            "2": "OC\\Preview\\MarkDown",
            "3": "OC\\Preview\\MP3",
            "4": "OC\\Preview\\TXT",
            "5": "OC\\Preview\\OpenDocument",
            "6": "OC\\Preview\\Movie",
            "7": "OC\\Preview\\Krita",
            "0": "OC\\Preview\\Imaginary",
            "23": "OC\\Preview\\ImaginaryPDF"
        },
        "enable_previews": true,
        "upgrade.disable-web": true,
        "mail_smtpmode": "smtp",
        "trashbin_retention_obligation": "auto, 30",
        "versions_retention_obligation": "auto, 30",
        "activity_expire_days": 30,
        "simpleSignUpLink.shown": false,
        "share_folder": "\/Shared",
        "one-click-instance.link": "https:\/\/nextcloud.com\/all-in-one\/",
        "upgrade.cli-upgrade-link": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/2726",
        "maintenance_window_start": 100,
        "allow_local_remote_servers": true,
        "davstorage.request_timeout": 3600,
        "documentation_url.server_logs": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/5425",
        "htaccess.RewriteBase": "\/",
        "dbpersistent": false,
        "auth.bruteforce.protection.enabled": true,
        "ratelimit.protection.enabled": true,
        "files_external_allow_create_new_local": false,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "preview_imaginary_url": "***REMOVED SENSITIVE VALUE***",
        "preview_imaginary_key": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpauth": true,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "DOMAIN": "****.eu"
    }
}

Apps

Enabled:
  - activity: 4.0.0
  - admin_audit: 1.21.0
  - announcementcenter: 7.1.1
  - bruteforcesettings: 4.0.0
  - calendar: 5.2.2
  - circles: 31.0.0
  - cloud_federation_api: 1.14.0
  - collectives: 2.16.3
  - comments: 1.21.0
  - contacts: 7.0.6
  - contactsinteraction: 1.12.0
  - dashboard: 7.11.0
  - dav: 1.33.0
  - deck: 1.15.1
  - emlviewer: 1.0.11
  - federatedfilesharing: 1.21.0
  - federation: 1.21.0
  - files: 2.3.1
  - files_antivirus: 6.0.0
  - files_downloadlimit: 4.0.0
  - files_external: 1.23.0
  - files_fulltextsearch: 31.0.0
  - files_pdfviewer: 4.0.0
  - files_reminders: 1.4.0
  - files_sharing: 1.23.1
  - files_trashbin: 1.21.0
  - files_versions: 1.24.0
  - firstrunwizard: 4.0.0
  - forms: 5.1.0
  - fulltextsearch: 31.0.0
  - fulltextsearch_elasticsearch: 31.0.0
  - geoblocker: 0.5.16
  - groupfolders: 19.0.4
  - guests: 4.2.0
  - impersonate: 2.0.0
  - logreader: 4.0.0
  - lookup_server_connector: 1.19.0
  - mail: 5.0.3
  - nextcloud-aio: 0.7.0
  - nextcloud_announcements: 3.0.0
  - notes: 4.12.0
  - notifications: 4.0.0
  - notify_push: 1.0.0
  - oauth2: 1.19.1
  - password_policy: 3.0.0
  - photos: 4.0.0-dev.1
  - picker: 1.0.12
  - polls: 7.4.2
  - previewgenerator: 5.8.0
  - privacy: 3.0.0
  - profile: 1.0.0
  - provisioning_api: 1.21.0
  - qownnotesapi: 25.2.0
  - recommendations: 4.0.0
  - related_resources: 2.0.0
  - richdocuments: 8.6.4
  - serverinfo: 3.0.0
  - settings: 1.14.0
  - sharebymail: 1.21.0
  - spreed: 21.0.4
  - support: 3.0.0
  - survey_client: 3.0.0
  - suspicious_login: 9.0.1
  - systemtags: 1.21.1
  - tables: 0.9.2
  - tasks: 0.16.1
  - text: 5.0.0
  - theming: 2.6.1
  - twofactor_admin: 4.8.0
  - twofactor_backupcodes: 1.20.0
  - twofactor_email: 2.8.0
  - twofactor_nextcloud_notification: 5.0.0
  - twofactor_totp: 13.0.0-dev.0
  - user_retention: 1.14.0
  - user_status: 1.11.0
  - viewer: 4.0.0
  - weather_status: 1.11.0
  - webhook_listeners: 1.2.0
  - whiteboard: 1.0.5
  - workflowengine: 2.13.0
Disabled:
  - app_api: 5.0.2 (installed 5.0.2)
  - encryption: 2.19.0 (installed 1.0.0)
  - maps: 1.5.0 (installed 1.5.0)
  - user_ldap: 1.22.0

Tips for increasing the likelihood of a response

  • Use the preformatted text formatting option in the editor for all log entries and configuration output.
  • If screenshots are useful, feel free to include them.
    • If possible, also include key error output in text form so it can be searched for.
  • Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.

do you have any templates in your Template directory for the whiteboard app? If not you will not get any picker.

Yes, lots of them. But maybe the whiteboard app isn’t aware that this folder is indeed my templates folder.
Actually, now you gave me a useful hint: This isn’t limited to the whiteboard app. I neither see a template picker for other file types, when I create a new file. This, even though there are lots of templates in the templates folder.

See this issue report. And indeed, on all my old nextcloud instances, the template picker just never shows up, despite the templates folder being well populated. Given that the code between the different Nextcloud instances is identical, I suspect that something in the database is missing and wasn’t added when those old installs were updated. But I still don’t know what exactly.

Go in to you settings and select what Template folder you want to have. Personal settings → office and try again.

Well, sorry, been there, done that. Many times already. If the solution was that simple, I would have posted here.

Checked the browser console log when you create a file?

Sorry, this is a server side issue, the browser console has little to say about it. Meanwhile, btw, I’ve gotten closer to the solution: It is different per user account. For some old user account, there database entries “templateFolder” in the oc_preferences folder, but not “templateDirectory”. The latter has to exist for the picker to appear, but you don’t get it to be created by setting the templates directory in the settings (those just change the templates folder used by the richdocuments (nextcloud office) app. I’ll see what happens if I create the entry manually.

I found the error: For some older users, the entry templatesDIrectory owned by “core” is missing from oc_preferences, instead, there is only a legacy entry templatesFolder, owned by the richdocuments app. In my case, I’ve fixed it by:

INSERT INTO oc_preferences (userid, appid, configkey, configvalue)
SELECT uid, 'core', 'templateDirectory', 'Vorlagen'
FROM oc_users
WHERE uid NOT IN (
  SELECT userid FROM oc_preferences
  WHERE appid = 'core' AND configkey = 'templateDirectory'
);

on my database.

However, the picker still behaves very erratic on non AIO instances. It is very very very slow and for the whiteboard it still presents an empty canvas even after selected a template.