mail icon indicating copy to clipboard operation
mail copied to clipboard

Files_pdfviewer cannot be properly disabled in Nextcloud 33

Open PeViz opened this issue 7 months ago • 2 comments

Steps to reproduce

  1. Disable files_pdfviewer either via Admin UI (Apps) or via command: php occ app:disable files_pdfviewer
  2. Try to open a PDF file in Mail app
  3. Optionally restart Apache

Expected behaviour

After disabling the app, PDF files should fall back to downloading or being handled by the browser natively.

Actual behaviour

Even after disabling the app, Nextcloud still attempts to open PDF files through files_pdfviewer and fails with "File not found" notification. Restarting Apache does not help.

Image

The command php occ config:app:delete files_pdfviewer enable_scripting does not resolve the issue either.

Environment

  • Nextcloud version: 33
  • PHP version: 8.4.20 (cli) (built: Apr 8 2026 08:16:38) (NTS gcc x86_64)
  • Web server: Apache
  • Browser: Chrome, Edge, Safari (and others)

Additional context

The app appears to be hardcoded or deeply integrated into the Viewer app in NC33, with no clean fallback when disabled. Disabling via UI and via occ both leave the system in a broken state.

PeViz avatar Apr 14 '26 05:04 PeViz

Closing this issue - wrong repository

After further investigation, this issue is not related to files_pdfviewer. The PDF in question is an email attachment opened directly from Nextcloud Mail, not from Files.

The actual problem is that Nextcloud Mail passes the attachment via an internal URL (/apps/mail/api/messages/{id}/attachment/...) which OnlyOffice, Richdocuments cannot resolve as it is not a file stored in Files.

When all viewers are disabled, Mail falls into an infinite loading loop instead of falling back to download. This is the correct place to report the issue: nextcloud/mail.

Sorry for the noise.

PeViz avatar Apr 14 '26 05:04 PeViz

Even after disabling the app, Nextcloud still attempts to open PDF files through files_pdfviewer and fails with "File not found" notification.

this step i cannot reproduce, clicking the name of the file will open it if the pdf_viewer is enabled. To download it, you need to open the action menu. If the pdf_ viewer is not enabled, then nothing happens when you click the attachment.

I agree that the expected behaviour when the app is not installed should be:

After disabling the app, PDF files should fall back to downloading or being handled by the browser natively.

GretaD avatar Apr 22 '26 08:04 GretaD