It turns out that Reverend Lovejoy didn't have a valid license to perform weddings when he presided over Homer and Marge's wedding (he had re-married them after their divorce in "A Milhouse Divided"), so they have to get married again, but just when the wedding is about to start, Homer disappears, and the only clue is a key attached to a keychain marked "SB"...but is it Sideshow Bob?
At church, Reverend Lovejoy announces that the Parson will be coming to town. Ned Flanders faints, and Homer leaves to go get "Smelling Salts" (although this was actually an excuse to leave church early). The parson arrives and informs the Reverend that, for a period of 3 months, Reverend Lovejoy was not an official minister, due to a bureaucratical error, and all official things he did during this time are were invalid, such as holding Jasper's wife's funeral, blessing Captain McAllister's ship, and blessing Cletus's house.
When Homer and Marge’s re-marriage turns out to be invalid because Reverend Lovejoy was not licensed at the time, Homer asks Marge to marry him again. Marge takes over as the wedding planner, becoming more and more irritable and lashing out at Homer for whatever he does (demanding non existent blue roses, saying she wants a lemon frosted cake when she told Homer he could pick the frosting, (and he chooses chocolate) and yelling at him when he let Lenny and Carl come). When Homer mysteriously disappears on their wedding day, Bart and Lisa search for answers and are led on a cryptic trail of clues, and find some keys with a keychain that has the initials S.B., leading them to Sideshow Bob (Kelsey Grammer). However, Sideshow Bob has an alibi as he was with Krusty.
Meanwhile, in a parody of Saw, Homer finds himself chained to a pipe in a dark room. When a mysterious voice tells him that the key (which is not the key but the 'hotter sauce') is the 'hotter to unlock his chains is inside a lollipop, he frantically eats it only to discover the lollipop is made of fiery hot sauce and he is tormented as Bart and Lisa race to save him. It turns out that the initials S.B. actually stand for Selma Bouvier, as his kidnappers are Marge's sisters Patty and Selma, using a voice modulator. They plan to keep Homer cooped up until Marge forgets about him. However, they later release him after they hear the vows Homer was going to say to Marge. But afterwards, Bart and Lisa use the keychain to trace them and confirm the twins were behind the kidnapping when the keys fit perfectly in the door lock to their apartment. Lisa threatens to tell Marge unless they pay for their parent's remarriage ceremony, which they reluctantly do.