Issue Bug Closed

#108523Wrong label on log error for invalid folder name

Riccardo De Contardi 12/18/25, 14:38 updated 03/31/26, 08:59

Description

on sysext/core/Classes/Utility/File/ExtendedFileUtility.php , lines 896-900

$this->writeLog(SystemLogFileAction::NEW_FOLDER, SystemLogErrorClassification::USER_ERROR, 'Invalid folder name "{identifier}"', ['identifier' => $folderName]);
            $this->addMessageToFlashMessageQueue('FileUtility.YouAreNotAllowedToCreateDirectories', [$folderName]);
        } catch (InsufficientFolderWritePermissionsException $e) {
            $this->writeLog(SystemLogFileAction::NEW_FOLDER, SystemLogErrorClassification::USER_ERROR, 'You are not allowed to create directories');
            $this->addMessageToFlashMessageQueue('FileUtility.YouAreNotAllowedToCreateDirectories');

as you can see addMessageToFlashMessageQueue use the same label FileUtility.YouAreNotAllowedToCreateDirectories but the log message for the first one is 'Invalid folder name "{identifier}"...'

Counting that sysext/core/Resources/Private/Language/fileMessages.xlf contains a label (not used)

<trans-unit id="FileUtility.InvalidFolderName">
        <source>Invalid folder name "%s"!</source>
      </trans-unit>

This is a bug

Reviews 1