Skip to content

[BUGFIX] Catch FolderDoesNotExistException in getCurrentFolder#27

Merged
helhum merged 1 commit intoprogrammfabrik:mainfrom
mikelwohlschlegel:fix/catch-folder-does-not-exist-exception
Mar 2, 2026
Merged

[BUGFIX] Catch FolderDoesNotExistException in getCurrentFolder#27
helhum merged 1 commit intoprogrammfabrik:mainfrom
mikelwohlschlegel:fix/catch-folder-does-not-exist-exception

Conversation

@mikelwohlschlegel
Copy link

When a folder is selected and then deleted via context menu, the page reloads with the deleted folder's ID still in the query parameters. getCurrentFolder() tries to resolve this non-existent folder and throws FolderDoesNotExistException.

Fall back to the root level folder when the requested folder no longer exists.

Steps to reproduce

  1. Navigate to the Filelist module in the TYPO3 backend
  2. Click on a folder to select it (e.g. user_upload/test/) — this sets the id query parameter in the URL
  3. Right-click the selected folder to open the context menu
  4. Choose Delete and confirm the deletion
  5. The page reloads with the deleted folder's ID still in the URL → exception is thrown

When a folder is selected and then deleted via context menu, the page
reloads with the deleted folder's ID still in the query parameters.
getCurrentFolder() tries to resolve this non-existent folder and throws
FolderDoesNotExistException.

Fall back to the root level folder when the requested folder no longer
exists.
@helhum
Copy link
Collaborator

helhum commented Mar 2, 2026

Thanks @mikelwohlschlegel

While I would argue that this is a TYPO3 bug as well, it totally makes sense to fix it here.

@helhum helhum merged commit 13cc5cc into programmfabrik:main Mar 2, 2026
12 checks passed
@helhum
Copy link
Collaborator

helhum commented Mar 2, 2026

Released as 3.1.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants