If your cloth diapers have developed an obnoxious smell when they get wet it's likely build-up of ammonia, bacteria, minerals and/or detergent in the fibers. This can be a from a combination of things that are out of your control like your water hardness or your washing machine. Variables that you can control more easily that might have an affect are your detergent and the specific wash routine you follow.
We have incredibly hard water at my house. After switching detergents I started having odor issues; it's definitely not good when the first thing you smell upon entering your home is pee. After hours of researching I came up with the following process that worked well for me. The results were amazing! Stay tuned for Part II of this series where I outline a specific protocol for washing/stripping the smell out of your cloth diapers.