Recently, Constantinescu and Ilie proved a variant of the well-known periodicity theoremof Fine and Wilf in the case of two relatively prime abelian periods and conjectured aresult for the case of two non-relatively prime abelian periods. In this paper, we answersome open problems they suggested. We show that their conjecture is false but we givebounds, that depend on the two abelian periods, such that the conjecture is true for allwords having length at least those bounds and show that some of them are optimal. We alsoextend their study to the context of partial words, giving optimal lengths and describingan algorithm for constructing optimal words.