If you haven't had any more problems, then it seems that your battery cable connections were probably oxidized (an insulator) and prevented the complete circuit. If you haven't disconnected the battery in years, this is not surprising. While I haven't had this happen on my cycles, I have had this happen several times on car battery connections, as well as home stereo. For cars, I then use a battery terminal cleaner brush/scraper on the post and terminals, tighten and coat with a protectant to prevent oxidation. On the stereo, one of two channels would stop working. Unplug all of the connections and replug and the channels all work again.
Just disconnecting and reconnecting will scratch through the oxidation layer enough to make connection again, it is best to disconnect and clean the connections with a little sandpaper, file, of scraping with a knife until a significant amount of clean metal surfaces can contact. Then tighten the connection. At a minimum,this should be done every few years - better every year if you are diligent with maintenance