Reversible solvatomagnetic switching in a spongelike manganese(II)-copper(II) 3D open framework with a pillared square/octagonal layer architecture.