Tries to rename notes to the full text spamming error log
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 738
- Forks
- 162
- Avg merge
- 6h 2m
- Merged PRs (30d)
- 35
Description
The app initially save(d) notes with an abbreviated text. It tries to rename the notes to the whole text failing because of filename length constraints. This spams my error log:
Steps to reproduce
- Type chinese text into a not
- Error log is full of renaming attempts
Expected behaviour
Truncate the filename to a sensible value.
Actual behaviour
Rename is attempted to the full text over and over and over
Screenshots
Server
- Notes app version: 6.0.1
- Nextcloud version: 34.03
- OS: Linux
- Web server: niginx
- PHP version: 5.8.9
- Database: MariaDB 12.3.2
Nextcloud configuration:
Log files
Add relevant parts of your nextcloud.log and/or your browser's JavaScript console here.
{"reqId":"cLCSu1CR8T9d3S3vAnpc","level":3,"time":"2026-08-18T20:13:18+00:00","remoteAddr":"2001:a61:11ff:ca01:a041:1108:d605:5486","user":"fuli","app":"notes","method":"PUT","url":"/index.php/apps/notes/api/v1/notes/237036?","scrip
tName":"/index.php","message":"Controller failed with OCP\Files\NotPermittedException","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/34.1.0","version":"34.0.3.2","exception":{"Exception":"OCP\Files\NotPermittedException"
,"Message":"Could not move /fuli/files/Notizen/\u5988\u5988\u6628\u665a\u770b\u5230\u4f60.md to /fuli/files/Notizen/\u201c\u5988\u5988\u6628\u665a\u770b\u5230\u4f60\u653e\u5728\u684c\u4e0a\u7684\u6210\u7ee9\u5355\u4e86\u3002\u4e0a
u9762\u4e0d\u662f\u4f18\u5c31\u662f\u826f\uff0c\u800c\u4e14\u4f60\u8fd8\u8df3\u4e86\u4e00\u5e74\u7ea7\u3002\u8fd9\u5e94\u8be5\u662f\u4f60\u4e2d\u5b66\u4ee5\u6765\u6700\u597d\u7684\u6210\u7ee9\u4e86\u5427\uff1f\u8fd9\u4e24\u5e74\u51
e0\u4e4e\u90fd\u662f\u4f60\u81ea\u5df1\u4e00\u4e2a\u4eba\u5b66\u7684\uff0c\u5988\u5988\u4ee5\u524d\u5728\u4f60\u9700\u8981\u5e2e\u52a9\u7684\u65f6\u5019\u8fd8\u8001\u8bad\u4f60\uff0c\u771f\u662f\u5e2e\u4e86\u5012\u5fd9\u3002\u62ff
u5230\u8fd9\u4e2a\u6210.md","Code":0,"Trace":[{"file":"/srv/www/nextcloud/apps/notes/lib/Service/Note.php","line":166,"function":"move","class":"OC\Files\Node\Node","type":"->"},{"file":"/srv/www/nextcloud/apps/notes/lib/Control
ler/NotesApiController.php","line":180,"function":"setTitleCategory","class":"OCA\Notes\Service\Note","type":"->"},{"file":"/srv/www/nextcloud/apps/notes/lib/Service/Util.php","line":25,"function":"{closure:OCA\Notes\Controlle
r\NotesApiController::update():164}","class":"OCA\Notes\Controller\NotesApiController","type":"->","args":["*** sensitive parameters replaced "]},{"file":"/srv/www/nextcloud/apps/notes/lib/Controller/Helper.php","line":135,"
function":"retryIfLocked","class":"OCA\Notes\Service\Util","type":"::"},{"file":"/srv/www/nextcloud/apps/notes/lib/Controller/NotesApiController.php","line":164,"function":"handleErrorResponse","class":"OCA\Notes\Controller\H
elper","type":"->"},{"file":"/srv/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":165,"function":"update","class":"OCA\Notes\Controller\NotesApiController","type":"->","args":[" sensitive parameters replace
d ***"]},{"file":"/srv/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":78,"function":"executeController","class":"OC\AppFramework\Http\Dispatcher","type":"->"},{"file":"/srv/www/nextcloud/lib/private/AppFramew
ork/App.php","line":137,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->"},{"file":"/srv/www/nextcloud/lib/private/Route/Router.php","line":324,"function":"main","class":"OC\AppFramework\App","type":"
::"},{"file":"/srv/www/nextcloud/lib/base.php","line":1172,"function":"match","class":"OC\Route\Router","type":"->"},{"file":"/srv/www/nextcloud/index.php","line":25,"function":"handleRequest","class":"OC","type":"::"}],"File":"/
srv/www/nextcloud/lib/private/Files/Node/Node.php","Line":478,"message":"Controller failed with OCP\Files\NotPermittedException","exception":"{"class":"OCP\Files\NotPermittedException","message":"Could not move /fuli/fil
es/Notizen/\u5988\u5988\u6628\u665a\u770b\u5230\u4f60.md to /fuli/files/Notizen/\u201c\u5988\u5988\u6628\u665a\u770b\u5230\u4f60\u653e\u5728\u684c\u4e0a\u7684\u6210\u7ee9\u5355\u4e86\u3002\u4e0a\u9762\u4e0d\u662f\u4f18\u5c31\u662f
u826f\uff0c\u800c\u4e14\u4f60\u8fd8\u8df3\u4e86\u4e00\u5e74\u7ea7\u3002\u8fd9\u5e94\u8be5\u662f\u4f60\u4e2d\u5b66\u4ee5\u6765\u6700\u597d\u7684\u6210\u7ee9\u4e86\u5427\uff1f\u8fd9\u4e24\u5e74\u51e0\u4e4e\u90fd\u662f\u4f60\u81ea\u5d
f1\u4e00\u4e2a\u4eba\u5b66\u7684\uff0c\u5988\u5988\u4ee5\u524d\u5728\u4f60\u9700\u8981\u5e2e\u52a9\u7684\u65f6\u5019\u8fd8\u8001\u8bad\u4f60\uff0c\u771f\u662f\u5e2e\u4e86\u5012\u5fd9\u3002\u62ff\u5230\u8fd9\u4e2a\u6210.md","code
":0,"file":"/srv/www/nextcloud/lib/private/Files/Node/Node.php:478","trace":"#0 /srv/www/nextcloud/apps/notes/lib/Service/Note.php(166): OC\Files\Node\Node->move()\n#1 /srv/www/nextcloud/apps/notes/lib/Controller/NotesAp
iController.php(180): OCA\Notes\Service\Note->setTitleCategory()\n#2 /srv/www/nextcloud/apps/notes/lib/Service/Util.php(25): OCA\Notes\Controller\NotesApiController->{closure:OCA\Notes\Controller\NotesApiController::updat
e():164}()\n#3 /srv/www/nextcloud/apps/notes/lib/Controller/Helper.php(135): OCA\Notes\Service\Util::retryIfLocked()\n#4 /srv/www/nextcloud/apps/notes/lib/Controller/NotesApiController.php(164): OCA\Notes\Controller\Helper-
handleErrorResponse()\n#5 /srv/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(165): OCA\Notes\Controller\NotesApiController->update()\n#6 /srv/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(78): OC\Ap
pFramework\Http\Dispatcher->executeController()\n#7 /srv/www/nextcloud/lib/private/AppFramework/App.php(137): OC\AppFramework\Http\Dispatcher->dispatch()\n#8 /srv/www/nextcloud/lib/private/Route/Router.php(324): OC\AppFrame
work\App::main()\n#9 /srv/www/nextcloud/lib/base.php(1172): OC\Route\Router->match()\n#10 /srv/www/nextcloud/index.php(25): OC::handleRequest()\n#11 {main}"}","CustomMessage":"Controller failed with OCP\Files\NotPermittedE
xception"}}
{"reqId":"9ERLSKFWkaHihV9mF4NK","level":3,"time":"2026-08-18T20:13:18+00:00","remoteAddr":"82.135.70.44","user":"fuli","app":"notes","method":"PUT","url":"/index.php/apps/notes/api/v1/notes/237036?","scriptName":"/index.php","messa
ge":"Controller failed with OCP\Files\NotPermittedException","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/34.1.0","version":"34.0.3.2","exception":{"Exception":"OCP\Files\NotPermittedException","Message":"Could not move
/fuli/files/Notizen/\u5988\u5988\u6628\u665a\u770b\u5230\u4f60.md to /fuli/files/Notizen/\u201c\u5988\u5988\u6628\u665a\u770b\u5230\u4f60\u653e\u5728\u684c\u4e0a\u7684\u6210\u7ee9\u5355\u4e86\u3002\u4e0a\u9762\u4e0d\u662f\u4f18\u5c31\u662f\u826f\uff0c\u800c\u4e14\u4f60\u8fd8\u8df3\u4e86\u4e00\u5e74\u7ea7\u3002\u8fd9\u5e94\u8be5\u662f\u4f60\u4e2d\u5b66\u4ee5\u6765\u6700\u597d\u7684\u6210\u7ee9\u4e86\u5427\uff1f\u8fd9\u4e24\u5e74\u51e0\u4e4e\u90fd\u662f\u4f60\u81ea\u5df1\u4e00\u4e2a\u4eba\u5b66\u7684\uff0c\u5988\u5988\u4ee5\u524d\u5728\u4f60\u9700\u8981\u5e2e\u52a9\u7684\u65f6\u5019\u8fd8\u8001\u8bad\u4f60\uff0c\u771f\u662f\u5e2e\u4e86\u5012\u5fd9\u3002\u62ff\u5230\u8fd9\u4e2a\u6210.md","Code":0,"Trace":[{"file":"/srv/www/nextcloud/apps/notes/lib/Service/Note.php","line":166,"function":"move","class":"OC\Files\Node\Node","type":"->"},{"file":"/srv/www/nextcloud/apps/notes/lib/Controller/NotesApiController.php","line":180,"function":"setTitleCategory","class":"OCA\Notes\Service\Note","type":"->"},{"file":"/srv/www/nextcloud/apps/notes/lib/Service/Util.php","line":25,"function":"{closure:OCA\Notes\Controller\NotesApiController::update():164}","class":"OCA\Notes\Controller\NotesApiController","type":"->","args":["*** sensitive parameters replaced "]},{"file":"/srv/www/nextcloud/apps/notes/lib/Controller/Helper.php","line":135,"function":"retryIfLocked","class":"OCA\Notes\Service\Util","type":"::"},{"file":"/srv/www/nextcloud/apps/notes/lib/Controller/NotesApiController.php","line":164,"function":"handleErrorResponse","class":"OCA\Notes\Controller\Helper","type":"->"},{"file":"/srv/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":165,"function":"update","class":"OCA\Notes\Controller\NotesApiController","type":"->","args":[" sensitive parameters replaced ***"]},{"file":"/srv/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":78,"function":"executeController","class":"OC\AppFramework\Http\Dispatcher","type":"->"},{"file":"/srv/www/nextcloud/lib/private/AppFramework/App.php","line":137,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->"},{"file":"/srv/www/nextcloud/lib/private/Route/Router.php","line":324,"function":"main","class":"OC\AppFramework\App","type":"::"},{"file":"/srv/www/nextcloud/lib/base.php","line":1172,"function":"match","class":"OC\Route\Router","type":"->"},{"file":"/srv/www/nextcloud/index.php","line":25,"function":"handleRequest","class":"OC","type":"::"}],"File":"/srv/www/nextcloud/lib/private/Files/Node/Node.php","Line":478,"message":"Controller failed with OCP\Files\NotPermittedException","exception":"{"class":"OCP\Files\NotPermittedException","message":"Could not move /fuli/files/Notizen/\u5988\u5988\u6628\u665a\u770b\u5230\u4f60.md to /fuli/files/Notizen/\u201c\u5988\u5988\u6628\u665a\u770b\u5230\u4f60\u653e\u5728\u684c\u4e0a\u7684\u6210\u7ee9\u5355\u4e86\u3002\u4e0a\u9762\u4e0d\u662f\u4f18\u5c31\u662f\u826f\uff0c\u800c\u4e14\u4f60\u8fd8\u8df3\u4e86\u4e00\u5e74\u7ea7\u3002\u8fd9\u5e94\u8be5\u662f\u4f60\u4e2d\u5b66\u4ee5\u6765\u6700\u597d\u7684\u6210\u7ee9\u4e86\u5427\uff1f\u8fd9\u4e24\u5e74\u51e0\u4e4e\u90fd\u662f\u4f60\u81ea\u5df1\u4e00\u4e2a\u4eba\u5b66\u7684\uff0c\u5988\u5988\u4ee5\u524d\u5728\u4f60\u9700\u8981\u5e2e\u52a9\u7684\u65f6\u5019\u8fd8\u8001\u8bad\u4f60\uff0c\u771f\u662f\u5e2e\u4e86\u5012\u5fd9\u3002\u62ff\u5230\u8fd9\u4e2a\u6210.md","code":0,"file":"/srv/www/nextcloud/lib/private/Files/Node/Node.php:478","trace":"#0 /srv/www/nextcloud/apps/notes/lib/Service/Note.php(166): OC\Files\Node\Node->move()\n#1 /srv/www/nextcloud/apps/notes/lib/Controller/NotesApiController.php(180): OCA\Notes\Service\Note->setTitleCategory()\n#2 /srv/www/nextcloud/apps/notes/lib/Service/Util.php(25): OCA\Notes\Controller\NotesApiController->{closure:OCA\Notes\Controller\NotesApiController::update():164}()\n#3 /srv/www/nextcloud/apps/notes/lib/Controller/Helper.php(135): OCA\Notes\Service\Util::retryIfLocked()\n#4 /srv/www/nextcloud/apps/notes/lib/Controller/NotesApiController.php(164): OCA\Notes\Controller\Helper->handleErrorResponse()\n#5 /srv/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(165): OCA\Notes\Controller\NotesApiController->update()\n#6 /srv/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(78): OC\AppFramework\Http\Dispatcher->executeController()\n#7 /srv/www/nextcloud/lib/private/AppFramework/App.php(137): OC\AppFramework\Http\Dispatcher->dispatch()\n#8 /srv/www/nextcloud/lib/private/Route/Router.php(324): OC\AppFramework\App::main()\n#9 /srv/www/nextcloud/lib/base.php(1172): OC\Route\Router->match()\n#10 /srv/www/nextcloud/index.php(25): OC::handleRequest()\n#11 {main}"}","CustomMessage":"Controller failed with OCP\Files\NotPermittedException"}}
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 in apps/notes/lib/Service/Note.php at line 166, where setTitleCategory moves the note, and trace the call from NotesApiController.php around line 180. Reproduce with a long Chinese title and inspect the filename-length failure. Done means long note titles use a sensible truncated filename and repeated updates no longer spam the error log.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100