Closed akroii closed 4 months ago
Do you have an example file that shows this issue that you could share maybe?
The check generating that warning is performed based on mime types.
We look at both the extension (to match to distributed as well as locally added mime type mappings) as well as, if necessary, the content to determine the file's mime type.
The ones we accept are:
Extension takes precedence over content as long as the extension is listed in the mime type mappings.
The file you've uploaded is listed in the default maps:
And seems to match here:
Unclear why this wouldn't work. Have you done any local mime type mappings customizations by chance?
EDIT: (below)
Possible workaround: put your template into
nextcloud/appdata_ocu20xefurkh/richdocuments/templates
Then runocc files:scan-app-data
This likely works because it bypasses the mime checks. It does validate your template is otherwise valid (assuming your template works for real after adding it this way). So this comes back to maybe your mime types being incomplete or some previously unknown bug here that merely causes our sanity checks to fail.
Closing due to missing requested info.
Describe the bug When you go to global template section and choose a template via the + icon: it acknowledged with error message: An error occurred: Only template files can be uploaded
To Reproduce Steps to reproduce the behavior:
Expected behavior The template is chooseable and display in the list global templates
Screenshots
Client details:
Server details
Operating system: Linux 5.10.0-27-amd64 #1 SMP Debian 5.10.205-2 (2023-12-31) x86_64
Webserver: Apache (cgi-fcgi)
Database: mysql 10.5.23
PHP version: 8.1.27
Modules loaded: Core, date, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dba, dom, hash, fileinfo, filter, ftp, gd, gettext, gmp, json, htscanner, iconv, SPL, intl, session, ldap, mbstring, mcrypt, standard, mysqlnd, OAuth, pcntl, exif, mysqli, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, readline, redis, Reflection, imap, shmop, SimpleXML, soap, sockets, sodium, ssh2, sysvmsg, sysvsem, sysvshm, tidy, timezonedb, tokenizer, xml, xmlreader, xmlwriter, xsl, zip, cgi-fcgi, imagick, apcu, Zend OPcache
Nextcloud version: 28.0.2 - 28.0.2.5
Updated from an older Nextcloud/ownCloud or fresh install:
Where did you install Nextcloud from: unknown
Signing status
#### Nextcloud log (data/nextcloud.log) ``` log is empty ``` #### Browser log ``` 09:24:15.769 richdocuments:387 GET https://XXXXXXXX/index.php/apps/richdocuments/template/preview/10184?y=297&x=210 404 (Not Found) 09:24:16.217 bootstrap:19 JQMIGRATE: Migrate is installed, version 3.4.1 09:24:16.695 UnifiedSearch.vue:51 Unified search initialized! 09:24:17.340 session-heartbeat.js:103 session heartbeat polling started 09:24:17.399 init.js:136 [Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952 addEvent @ snap.js:143 (anonymous) @ snap.js:250 listen @ snap.js:249 e.exports @ snap.js:512 Je @ init.js:136 (anonymous) @ main.js:44 Show 4 more frames Show less 09:24:17.399 init.js:136 [Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952 addEvent @ snap.js:143 (anonymous) @ snap.js:253 listen @ snap.js:252 e.exports @ snap.js:512 Je @ init.js:136 (anonymous) @ main.js:44 Show 4 more frames Show less 09:24:17.422 richdocuments:1 [DOM] Password forms should have (optionally hidden) username fields for accessibility: (More info: https://goo.gl/9p2vKq) β 09:24:17.476 UnifiedSearchModal.vue:244 Search providers (4)Β [{β¦}, {β¦}, {β¦}, {β¦}, __ob__: e] 09:24:17.609 UnifiedSearchModal.vue:248 Contacts (25)Β [{β¦}, {β¦}, {β¦}, {β¦}, {β¦}, {β¦}, {β¦}, {β¦}, {β¦}, {β¦}, {β¦}, {β¦}, {β¦}, {β¦}, {β¦}, {β¦}, {β¦}, {β¦}, {β¦}, {β¦}, {β¦}, {β¦}, {β¦}, {β¦}, {β¦}, __ob__: e] 09:24:48.058 XHR finished loading: GET "Possible workaround: put your template into nextcloud/appdata_ocu20xefurkh/richdocuments/templates Then run
occ files:scan-app-data