octobercms/october · warning · ApplicationException
editor::lang.filesystem.selected_files_not_found
Error message
editor::lang.filesystem.selected_files_not_found
What it means
Thrown by editorMoveFilesOrDirectories when the $selectedList ('source') array is empty (lines 163-165). Message: 'Selected files not found'. It is a pure precondition check — nothing has been touched yet — and exists because a move command with no sources is meaningless; the sidebar UI normally makes it unreachable.
Source
Thrown at modules/editor/traits/FileSystemFunctions.php:164
if (!@rmdir($fullPath)) {
throw new ApplicationException(Lang::get(
'editor::lang.filesystem.error_deleting_dir',
['name' => $path]
));
}
}
}
}
}
/**
* editorMoveFilesOrDirectories
*/
protected function editorMoveFilesOrDirectories($basePath, $selectedList, $destinationDir)
{
if (!count($selectedList)) {
throw new ApplicationException(Lang::get('editor::lang.filesystem.selected_files_not_found'));
}
if (!strlen($destinationDir)) {
throw new ApplicationException(Lang::get('editor::lang.filesystem.select_destination_dir'));
}
if (!$this->validateFileSystemPath($destinationDir)) {
throw new ApplicationException(Lang::get('editor::lang.filesystem.invalid_path'));
}
// Ensure directory exists
$destinationFullPath = $basePath.'/'.$destinationDir;
if (!File::isDirectory($destinationFullPath)) {
File::makeDirectory($destinationFullPath, 0755, true, true);
}
// Path is gone
if (!file_exists($destinationFullPath) || !is_dir($destinationFullPath)) {View on GitHub (pinned to b608633a7e)
Solutions
- Re-select the files/folders in the sidebar and repeat the move
- If scripting the API, always send a non-empty 'source' array of relative paths
- Update the page (clear stale selection state) and try again
- Check your request payload actually serializes the selection (network tab: 'source' must be a JSON array)
Example fix
// before
{ "source": [], "destination": "js" }
// after
{ "source": ["css/old.css"], "destination": "js" } Defensive patterns
Strategy: validation
Validate before calling
if (!is_array($source) || !count($source)) {
// do not send the move command; re-select items in the sidebar
} Prevention
- Always send a non-empty 'source' array in move payloads
- In custom UIs, guard the move action on a non-empty selection
- Verify payload serialization in the network tab when moves mysteriously fail
When it happens
Trigger: command_onAssetMove with documentData 'source' => [] — e.g. a drag-and-drop that failed to register the selection, a stale page where the selection was cleared, or a custom API client posting an empty array (a missing key would instead fail earlier in ApiHelpers::assertGetKey).
Common situations: Custom scripts integrating with the editor endpoints; UI edge cases where a node drag starts before selection state is set; automated tests exercising the move command with placeholder payloads.
Related errors
- editor::lang.filesystem.select_destination_dir
- editor::lang.filesystem.type_not_allowed
- editor::lang.filesystem.error_deleting_dir_not_empty
- editor::lang.filesystem.destination_exists
- editor::lang.filesystem.directory_name_cant_be_empty
AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21).
Data as JSON: /api/errors/80f2c97875272abb.
Report an issue: GitHub.