At a general election in which a magistrate is elected for an unexpired term, the circuit judge, or the chief judge thereof if there is more than one judge of the circuit court, shall cause a notice of such election to be published prior to such election as a Class II-0 legal advertisement in compliance with the provisions of article three, chapter fifty-nine of this code, and the publication area for such publication shall be the county involved. If the vacancy occurs before the primary election held to nominate candidates to be voted for at the general election, at which any such vacancy is to be filled, candidates to fill such vacancy shall be nominated at such primary election in accordance with the time requirements and the provisions and procedures prescribed in article five, chapter three of this code. Otherwise, they shall be nominated by the county executive committee in the manner provided in section nineteen, article five, chapter three of this code, as in the case of filling vacancies in nominations, and the names of the persons so nominated and certified to the clerk of the circuit court of such county shall be placed upon the ballot to be voted at such next general election.