MODX Directory names

Is it really possible to create directories with special characters and whitespace in MODX 3?

For MODX 2, we always used Filesluggy, which no longer works in MODX 3.

Is there an existing solution for translinting and sanitize directories? Otherwise, I might consider creating a custom Extra for it. How do you handle this?

Many of our clients are now creating directories with uncompatible characters and Whitespaces like „My Directory Näme“ in the Manager.

Filesluggy renamed the directory to „my-directory-name“.

The FileSluggy extra uses the events OnFileManagerDirCreate and OnFileManagerDirRename for this (that are invoked after a directory gets created or renamed in the manager).

These events are still available in MODX 3.
You could create a custom plugin to handle them or try to adapt the FileSluggy extra.

See also this issue I created a while ago:

Yes, thank you very much. I’ve already started working on it.

I’m just completely puzzled that there’s still no solution for this. Surely there must be others with the same problem, right?

@halftrainedharry In the issue you linked, GP says that this is now in the MODX core. But that only applies to files, not to folders, right?

When you upload a file in MODX 3, the file name gets now transliterated (if the system setting upload_translit is set). So handling of the event OnFileManagerUpload (that FileSluggy also does) is no longer necessary (in most cases).

But when you create a directory in the manager, nothing checks the directory name in the processor (or the createContainer() function) as far as I can tell: