Camera SD card not detected by camera/gallery

Hi,

I have an issue on my i9100 since a few days ago, after switching roms:

Camera: error message "Insert an SD card before using the camera."
Gallery: error message "No external storage available"

I have an external SD card, and it's working fine. I'm flashing roms from it, it's detected by Windows, and also by Android (in settings/storage) and my file explorer app.
I tried several roms, and I have the same problem with all of them.
I also tried the following:
- Factory reset, I flashed AOKP, Resurrection Remix, Carbon Cyanogen, etc.
- format sd card in recovery (default file system, which I suppose is FAT31, and exFat too)
- format sd card in windows
- reboot and clear the cache and data of gallery and camera
- This app, which said that I don't need it (already fixed in the roms)

None of this helped.
I think the problem started when I decided to completely format my phone, and I suppose I formatted my external SD card too.

Any idea? Thanks in advance