You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Opening PDF fails: The "documentType" parameter for the config object is invalid. Please correct it. #331
I'm currently unable to open a PDF in NextCloud with OpenOffice and Community Document Server installed.
System info:
Nextcloud: v28.0.6 (Hetzner Storage Share)
OnlyOffice v9.3.0
Community Document Server v0.1.17
As this is a managed Nextcloud instance I'm unable to edit config files or upgrade downgrade versions.
An obvious easy workaround is to go into OnlyOffice settings and uncheck PDF filetype under "The default application for opening the format". This would allow PDFs to be handled with the default NextCloud viewer. But when any option is changed and the settings saved, on reload they appear back checked.
Yes, I can confirm that I have this issue as well on v28.0.7 and OnlyOffice app v9.3.0. This may be due to an older version of OnlyOffice server, which in my case was not updated for a while, but I am not sure.
...
Actually, I googled a bit, and it does seem to be an issue with the OnlyOffice server that needs to be updated. There are a few threads discussing this.
Je ne parviens actuellement pas à ouvrir un PDF, DOCXF, OFORM dans NextCloud avec OpenOffice et Community Document Server installés.
Informations système :
Nextcloud : v30.0.1
OnlyOffice v9.5.0
Serveur de documents communautaire v0.1.18
Comme il s’agit d’une instance Nextcloud gérée, je ne peux pas modifier les fichiers de configuration ou mettre à niveau les versions antérieures.
I have the same issue. When I go to administration settings, configure ONLYOFFICE and uncheck "pdf", then press save, and then return to the ONLYOFFICE settings, the "pdf" is still checked. It looks like it's impossible to uncheck it.
EDIT: Okay, after emptying the browser cache, it seems that unchecking the PDF handling worked.
Fixed for v0.4.0, by #387. The part of your report that matters is the last sentence — "when any option is changed and the settings saved, on reload they appear back checked" — which is a bug in this app, not in the connector.
What was wrong.AutoConfig::autoConfigIfNeeded() runs from boot(), so on every request, and it re-applied syncSupportedFormats() against a hardcoded list. Anything the admin had enabled or disabled that the list did not agree with was switched back by the next page load:
So unchecking PDF under "The default application for opening the format" — your workaround — held until you navigated anywhere, and then came back.
The list had gone stale as well. It predated 9.x and named twelve editable formats where the bundled server declares twenty-nine, and three of the twelve (doc, ppt, xls) it cannot edit at all, only auto-convert.
What changed. Formats are seeded once, at initial auto-configuration, from the format matrix the bundled document server actually ships, and never touched again — from there the admin owns them. Seeding still earns its keep because the connector leaves the lossy-editable formats (odt, ods, odp, csv, rtf, txt) off by default. Default openers stay a curated ten rather than following capability, since making OnlyOffice the default handler for .txt or .html would fight Nextcloud's own apps. A fresh install now seeds 29 editable formats where it seeded 12.
An instance configured before this — yours — is repaired on upgrade to 0.4.0, but only when its settings still hold exactly what the old code wrote. Anything else is a choice somebody made, and is left alone.
Proof.tests/rig/formats_test.py, run against master just now on Nextcloud 34 with connector 10.1. It checks four things in order: the seed a fresh install gets; that an admin's own choice survives page loads; that the setting reaches the editor (read from the connector's own config response, where a format decision shows up as editorConfig.mode); and the repair, by driving two real occ upgrade runs — repair steps are not part of occ maintenance:repair, so an app's installed version being behind info.xml is the only thing that carries them.
PASS formats 42s
This does not by itself explain the documentType error in your title — that is the connector deciding what to do with a PDF — but it does mean your workaround now sticks: unchecking PDF stays unchecked. If you are still on a managed instance and can try 0.4.0, I would like to know whether the error survives the upgrade, since the bundled server now declares pdf editable where the old hardcoded list did not.
Activity
serge-vk commentedon Jul 15, 2024
Yes, I can confirm that I have this issue as well on v28.0.7 and OnlyOffice app v9.3.0. This may be due to an older version of OnlyOffice server, which in my case was not updated for a while, but I am not sure.
...
Actually, I googled a bit, and it does seem to be an issue with the OnlyOffice server that needs to be updated. There are a few threads discussing this.
rsedlmeier commentedon Jul 30, 2024
Many thanks, that workaround helps
Qnap66 commentedon Nov 6, 2024
Je ne parviens actuellement pas à ouvrir un PDF, DOCXF, OFORM dans NextCloud avec OpenOffice et Community Document Server installés.
Informations système :
Nextcloud : v30.0.1
OnlyOffice v9.5.0
Serveur de documents communautaire v0.1.18
Comme il s’agit d’une instance Nextcloud gérée, je ne peux pas modifier les fichiers de configuration ou mettre à niveau les versions antérieures.
ballerbude commentedon Nov 11, 2025
I have the same issue. When I go to administration settings, configure ONLYOFFICE and uncheck "pdf", then press save, and then return to the ONLYOFFICE settings, the "pdf" is still checked. It looks like it's impossible to uncheck it.
EDIT: Okay, after emptying the browser cache, it seems that unchecking the PDF handling worked.
chadek commentedon Sep 15, 2026
Fixed for v0.4.0, by #387. The part of your report that matters is the last sentence — "when any option is changed and the settings saved, on reload they appear back checked" — which is a bug in this app, not in the connector.
What was wrong.
AutoConfig::autoConfigIfNeeded()runs fromboot(), so on every request, and it re-appliedsyncSupportedFormats()against a hardcoded list. Anything the admin had enabled or disabled that the list did not agree with was switched back by the next page load:So unchecking PDF under "The default application for opening the format" — your workaround — held until you navigated anywhere, and then came back.
The list had gone stale as well. It predated 9.x and named twelve editable formats where the bundled server declares twenty-nine, and three of the twelve (
doc,ppt,xls) it cannot edit at all, only auto-convert.What changed. Formats are seeded once, at initial auto-configuration, from the format matrix the bundled document server actually ships, and never touched again — from there the admin owns them. Seeding still earns its keep because the connector leaves the lossy-editable formats (odt, ods, odp, csv, rtf, txt) off by default. Default openers stay a curated ten rather than following capability, since making OnlyOffice the default handler for
.txtor.htmlwould fight Nextcloud's own apps. A fresh install now seeds 29 editable formats where it seeded 12.An instance configured before this — yours — is repaired on upgrade to 0.4.0, but only when its settings still hold exactly what the old code wrote. Anything else is a choice somebody made, and is left alone.
Proof.
tests/rig/formats_test.py, run againstmasterjust now on Nextcloud 34 with connector 10.1. It checks four things in order: the seed a fresh install gets; that an admin's own choice survives page loads; that the setting reaches the editor (read from the connector's own config response, where a format decision shows up aseditorConfig.mode); and the repair, by driving two realocc upgraderuns — repair steps are not part ofocc maintenance:repair, so an app's installed version being behindinfo.xmlis the only thing that carries them.This does not by itself explain the
documentTypeerror in your title — that is the connector deciding what to do with a PDF — but it does mean your workaround now sticks: unchecking PDF stays unchecked. If you are still on a managed instance and can try 0.4.0, I would like to know whether the error survives the upgrade, since the bundled server now declarespdfeditable where the old hardcoded list did not.