[Bug]: Document templates broken
⚠️ This issue respects the following points: ⚠️
- [x] This is a bug, not a question or a configuration/webserver/proxy issue.
- [x] This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- [x] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- [x] I agree to follow Nextcloud's Code of Conduct.
Bug description
Create a new office document or text document in Nextcloud. The document creation dialog only ask for the filename but doesn't let me chose one of the Templates from the "Templates" folder
Happens to me on c.nc.com. On a fresh setup LTD it seems to work but this is also a older version (30.0.10) while c.cn.com runs on 31.0.4
Steps to reproduce
- Make sure to have a "Templates" folder with some templates
- Create a new document
- You get only asked for a filename:
Expected behavior
I can chose a Template for the new document
Nextcloud Server version
31
Operating system
None
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
- [ ] Default user-backend (database)
- [ ] LDAP/ Active Directory
- [ ] SSO - SAML
- [ ] Other
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response
I also tried to delete and re-create the "Templates" folder with the Nextcloud file manager. No improvements.
But what I don't have is the "create new template folder" option in the "New" menu, which might be a way to solve the problem.
cc @juliusknorr
Are you sure it never lets you select a template? There is an issue where the template picker takes a reeeally long time to appear the first time you open it, but that is being worked on. I was not able to reproduce this on c.nc.com, so try waiting a bit to see if picker dialog appears? Otherwise, maybe a screen recording or browser logs or something would help.
I'm seeing exactly the same on several of my instances. On one instance which I recently set up, it works, but on the older ones it does not, which lets me suspect that some switch in the database is missing, because this feature isn't that old.
Are you sure it never lets you select a template? There is an issue where the template picker takes a reeeally long time to appear the first time you open it, but that is being worked on. I was not able to reproduce this on c.nc.com, so try waiting a bit to see if picker dialog appears? Otherwise, maybe a screen recording or browser logs or something would help.
I have two Nextcloud AIO instances, one is a fresh install where everything works as expected. Another is migrated from a native install. There it reproducibly does NOT work. the whiteboard app for instance immediately shows an empty canvas, Collabora immediately opens a new empty table/document etc instead of presenting me with the picker first. On both instances, the contents of the templates folder are identical and on both instances, the folder is chosen as the templates folder for Nextcloud Office.
P.S.: Until recently, when I set up a new instance, I wasn't even aware that there is a template picker, because on those old nextcloud instances it just never shows up (again, "old" means that the initial setup was done long ago, not the the nextcloud server or the apps are old. They are all updated to the very latest versions).
Do check browser console log when you create a file. I have had cases where a broken template breaks the picker.
Now I have found that on the same instance, some users are affected why others are not. The difference is that those who are affected lack an entry "templateDirectory" in the table oc_preferences. This doesn't seem to be the same as the "templateFolder", which can be changed from the settings, which according to the interface affects Nextcloud office, but in reality, for those affected users makes no difference.
So, I've verified: adding a "templateDirectory" line in oc_preferences for the affected user fixes it for me: In postgres for instance I do:
INSERT INTO oc_preferences (userid, appid, configkey, configvalue)
VALUES ('someuser', 'core', 'templateDirectory', 'Vorlagen');
This cannot be changed from the settings window, unfortunately, so this is clearly a bug.
And the picker is extremely slow on non AIO instances and sometimes, the selection of a template has no effect, e.g. the whiteboard still presents an empty canvas.