Skip to content

Misleading filesystem.mkdir.error.backupDir error and broken translation key #77

Description

@machinas-achim

Hello!

When testing EasyBackupBundle 2.0.5 with the official Kimai Docker image, I ran into a misleading error that made troubleshooting unnecessarily difficult.

The UI displayed an error dialog with this text:

filesystem.mkdir.error.backupDir

However, the backup directory existed, was writable, and backups/restores themselves were not the problem.

After tracing the code, I found two issues:

  1. EasyBackupController::log() catches any exception while creating/appending to easybackup.log and always reports:
    filesystem.mkdir.error.backupDir
    This can be triggered by completely unrelated problems (for example, easybackup.log not being writable), so the error message is misleading.
  2. The English translation appears to be incorrect. The controller uses:
$this->flashError('filesystem.mkdir.error.backupDir');

but flashmessages.en.xlf contains:

<source>filesystem.mkdir.backupDir</source>

without the ".error" string, so the raw translation key is shown instead of a user-friendly message.

Suggestions

  • Fix the translation key so the message is translated correctly.
  • Ideally report a more accurate error for log write failures (or include the actual exception message in debug mode) instead of always using filesystem.mkdir.error.backupDir.

In my case, the actual problem was a permissions issue on easybackup.log, but the reported error pointed me towards the backup directory instead. That made diagnosing the issue much harder than it needed to be.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions