They didn't know. In fact, Wilde was supposed to come back for Series 19. Then, due to health, he was supposed to miss the first half of Series 19 but return for the second half. His health prevented the mid-filming return, so he was supposed to come back and film the "holiday" episode that would explain his absence with the expectation he would be back for Series 20. Exactly how that didn't work out in the end is still somewhat unclear to me given the different accounts in Vine and Bell's books.
As for Series 18, I like all the episodes except the holiday special, "Extra Extra." I've just never liked that one. George Chakris as the director doesn't do anything for me, for one, and the whole thing with Compo riding a horse seems like another shot at a joke we've already seen. Finally, there is a subplot involving Barry getting Glenda a moped for her birthday that just seems totally tacked on to make sure the episode lasted long enough.