[Bug]: FileSystem update and post_update signals do not dispatch events with IEventDispatcher
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
Since version 18 is deprecated so I consider that it is a problem because in my case I am in version 31 and events like the ones I mention are still not migrated.: https://docs.nextcloud.com/server/latest/developer_manual/basics/events.html#hooks
The signal_update / signal_post_update signals of FileSystem are not subscribed to by HookConnector:
Places where they are issued:
https://github.com/search?q=repo%3Anextcloud%2Fserver%20signal_update&type=code
https://github.com/search?q=repo%3Anextcloud%2Fserver+signal_post_update&type=code
In my case the one that interests me the most is this one because there is no way to find out when a file has been updated through IEventDispatcher other than NodeWrittenEvent which occurs in many use cases not only when you update the file:
Bonus: these uses of HookConnector should use FileSystem constants:
Steps to reproduce
There is nothing to reproduce, in the code examples I put above you can see it clearly.
Expected behavior
There should be an event through IEventDispatcher in which you learn that a node has been changed.
Nextcloud Server version
31
Operating system
None
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
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
Nextcloud Signing status
Nextcloud Logs
Additional info
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with lib/private/Files/Node/HookConnector.php and the signal_update and signal_post_update emissions linked in the issue, then inspect apps/dav/lib/Connector/Sabre/File.php around the referenced update path. Determine how these FileSystem signals should be represented through IEventDispatcher without relying on NodeWrittenEvent. Done means the relevant file-update events are dispatched and the HookConnector references FileSystem constants where appropriate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100