Skip to content

[Bug]: Maps app fails with "Undefined constant OCP\Share::SHARE_TYPE_USER" on Nextcloud 32 #1469

@BigPiloto

Description

@BigPiloto

⚠️ This issue respects the following points: ⚠️

Bug description

Nextcloud version: 32.0.0
App: Maps (custom_apps/maps)
PHP version: 8.3.26

When maps is active, you can create shares, but you cannot delete file shares.

Steps to reproduce

  1. Install and enable the Maps app on Nextcloud 32.
  2. Try to share files/folders. (works)
  3. Try to unshare files/folders. (fails with Undefined constant OCP\Share::SHARE_TYPE_USER error in logs).

Expected behavior

The unshare action should complete without errors.

Installation method

Official Docker image

Operating system

Debian/Ubuntu

PHP engine version

Other

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install of the server?

Updated to Nextcloud Hub 25 Autumn (32.0.0)

Is this bug present after an update or on a fresh install of the app?

Fresh Nextcloud Maps install (never installed before)

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

Enabled:
  - activity: 5.0.0-dev.0
  - admin_audit: 1.22.0
  - announcementcenter: 7.2.1
  - bruteforcesettings: 5.0.0-dev.0
  - calendar: 6.0.0
  - camerarawpreviews: 0.8.7
  - circles: 32.0.0
  - cloud_federation_api: 1.16.0
  - comments: 1.22.0
  - contacts: 8.0.2
  - contactsinteraction: 1.13.1
  - cookbook: 0.11.4
  - cospend: 3.1.3
  - dashboard: 7.12.0
  - dav: 1.34.2
  - deck: 1.16.0
  - drawio: 3.1.0
  - drop_account: 2.7.1
  - external: 7.0.0
  - federatedfilesharing: 1.22.0
  - federation: 1.22.0
  - files: 2.4.0
  - files_archive: 1.2.7
  - files_downloadactivity: 1.18.1
  - files_downloadlimit: 5.0.0-dev.0
  - files_pdfviewer: 5.0.0-dev.0
  - files_reminders: 1.5.0
  - files_sharing: 1.24.0
  - files_trashbin: 1.22.0
  - files_versions: 1.25.0
  - forms: 5.2.1
  - gestion: 2.8.7
  - impersonate: 3.0.0
  - integration_giphy: 2.1.0
  - integration_github: 3.2.1
  - integration_google: 4.1.0
  - inventory: 0.1.3
  - libresign: 11.4.1
  - logreader: 5.0.0-dev.0
  - lookup_server_connector: 1.20.0
  - mail: 5.5.6
  - maps: 1.6.0
  - nextcloud_announcements: 4.0.0-dev.0
  - notifications: 5.0.0-dev.0
  - notify_push: 1.2.0
  - oauth2: 1.20.0
  - onlyoffice: 9.11.0
  - password_policy: 4.0.0-dev.0
  - passwords: 2025.10.20
  - photos: 5.0.0-dev.1
  - previewgenerator: 5.10.0
  - privacy: 4.0.0-dev.0
  - profile: 1.1.0
  - provisioning_api: 1.22.0
  - quota_warning: 1.22.0
  - recognize: 10.0.4
  - related_resources: 3.0.0-dev.0
  - serverinfo: 4.0.0-dev.0
  - settings: 1.15.1
  - sharebymail: 1.22.0
  - side_menu: 5.1.3
  - socialsharing_telegram: 3.3.0
  - socialsharing_whatsapp: 3.3.0
  - spreed: 22.0.0
  - survey_client: 4.0.0-dev.0
  - suspicious_login: 10.0.0-dev.0
  - systemtags: 1.22.0
  - talk_matterbridge: 1.32.1026000
  - terms_of_service: 4.6.0
  - text: 6.0.0-dev.0
  - theming: 2.7.0
  - theming_customcss: 1.18.0
  - twofactor_backupcodes: 1.21.0
  - twofactor_email: 2.8.2
  - twofactor_nextcloud_notification: 6.0.0-dev.0
  - twofactor_totp: 14.0.0
  - updatenotification: 1.22.0
  - user_status: 1.12.0
  - viewer: 5.0.0-dev.0
  - weather_status: 1.12.0
  - webhook_listeners: 1.3.0
  - welcome: 1.3.0
  - whiteboard: 1.2.1
  - workflowengine: 2.14.0

Nextcloud Signing status

Nextcloud Logs

Exception: Undefined constant OCP\Share::SHARE_TYPE_USER in file '/var/www/html/custom_apps/maps/lib/Hooks/FileHooks.php' line 154

Browser Console

Additional info

Sharing works, but unsharing is blocked by the exception.
It seems related to the removal of the constant OCP\Share::SHARE_TYPE_USER in recent Nextcloud versions.
Possible fix: replace OCP\Share::SHARE_TYPE_USER with \OCP\Share\IShare::TYPE_USER in FileHooks.php.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions