MODx Media Browser not showing any files?

If you’re moving a MODx site to a new host or you rebuild PHP and all of a sudden the MODx Media Browser stops listing files, it could be that your MOD system settings have Use Multibyte Extension enabled but PHP hasn’t been compiled with the –enable-mbstring option.

Hidden away in the MODx Media Browser is a failed response to a JSON request and an error message showing…

Fatal error: Call to undefined function mb_strtolower() in on line 168

And that leads you to this useful comment in the PHP Manual:

“The PHP mbstring extension, which is required to handle international character sets, is not available on your server. Check your PHP configuration and make sure that PHP has been compiled with –enable-mbstring.”

Can’t recompile PHP or just need to get your Media Browser working again? Look up the Use Multibyte Extension in the system settings and set it to No.

fatal: bad color value ‘auto’ for variable ‘color.branch.current’

If you’ve been fiddling with your Terminal colours and you’re seeingĀ this errorĀ fatal: bad color value ‘auto’ for variable ‘color.branch.current’ it’s because you’ve got an error in your git config. You need to narrow down whether it’s in your local config or within your current repo.

But, we can actually see what comes from where…

$ git config --list --system
$ git config --list --global
$ git config --list --local

OK, so it’s in the global git config. Let’s edit that…

$ git config --global --edit

… and set the colours properly…

14 [color "branch"]
15   current = green bold
16   remote = white reverse