We uncover a new pathway towards multiferroicity, showing how magnetism can drive ferroelectricity without relying on inversion symmetry breaking of the magnetic ordering. Our free-energy analysis demonstrates that any commensurate spin-density-wave ordering with a phase dislocation, even if it is collinear, gives rise to an electric polarization. Because of the dislocation, the electronic and magnetic inversion centers do not coincide, which turns out to be a sufficient condition for multiferroic coupling. The novel mechanism explains the formation of multiferroic phases at the magnetic commensurability transitions, such as the ones observed in YMn2O5 and related compounds. We predict that in these multiferroics an oscillating electrical polarization is concomitant with the uniform polarization. On the basis of our theory, we put forward new types of magnetic materials that are potentially ferroelectric.