[WIP] [Bug]: Maps app fails with "Undefined constant OCP\Share::SHARE_TYPE_USER" on Nextcloud 32 #1470
+0
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.
Original issue description:
Original prompt
This section details on the original issue you should resolve
<issue_title>[Bug]: Maps app fails with "Undefined constant OCP\Share::SHARE_TYPE_USER" on Nextcloud 32</issue_title>⚠️ This issue respects the following points: ⚠️
<issue_description>###
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
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?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
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.</issue_description>
Comments on the Issue (you are @copilot in this section)
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.