The 1983 document doesn’t say which of the things it lists is primary or secondary. I think the author of the article judges that because the unitive purpose is mentioned first and the procreative purpose is mentioned second, therefore the unitive purpose is intended as primary and the procreative purpose is intended as secondary; however, the document doesn’t say that, and such inferences need to be backed up by evidence, not just assumed.
Imagine that I asserted there is a contraction in the Bible because Matthew 10:2 lists the apostles as “first” Peter and then James and John, and the rest; but Galatians 2:9 mentions Peter second, saying, “James and Cephas and John, who were reputed to be pillars.” How would you respond if I asserted that by listing Peter second Paul teaches that his rank was inferior to James? I hope you would respond that Paul doesn’t teach this because not every list is by order of rank. Similarly, the author of that article you quoted seems to imply that the 1983 code of canon law, by listing procreation second, teaches that procreation is the secondary purpose of marriage. But it doesn’t teach that – because not every list is by order of rank.
Also, the same pope who promulgated that code of canon law had already reaffirmed that procreation is the primary purpose of marriage: “the primary vocation of married couples to participate in God’s creative activity: by begetting in love and for love a new person.” Familiaris Consortio 36. “procreation and education…this constitutes its primary and irreplaceable form of expression.” Familiaris Consortio 44.
Since Pope John Paul 2 had already reaffirmed the primacy of procreation in 1981 in Familiaris Consortio, it is unlikely that he reduced it to a secondary role in the 1983 code of canon law. And since not every list is ordered by rank, the fact that that document mentions procreation second does not imply that it teaches it is of secondary rank. Therefore there is no contradiction, and the Church continues to teach both before and after Vatican 2 that the primary purpose of marriage is procreative, and the secondary purpose is unitive. I hope this helps. God bless.