Nowadays it’s not uncommon for a long-running TV series to offer a “special” musical episode. It’s a practice that didn’t exist when Rod Serling’s “Twilight Zone” was airing, but if it had, the result might have been something along the lines of Danny Boyle’s “Yesterday,” intended to be a genial fable about the iconic songs of the Beatles written by Richard Curtis, whose stock-in-trade heretofore has been fairy-tale-level romantic comedies, a genre he inevitably manages to fold into this script as well. Consider it a Curtis twofer, which, despite Boyle’s typical visual razzmatazz, proves to be about twice as unpalatable.

Had “The Twilight Zone” attempted a musical episode, the premise of a twelve-second global power outage that wiped the memory of a treasure-trove of songs from the minds of all humanity save for a single guy might have been irresistible; and making the guy an aspiring singer-songwriter who chose to save a stalled career by claiming the songs as his own would have fit right in with the show’s paradigm. There would have been a difference, though: Serling would have followed specific rules established by the new world the premise had created. Curtis and Boyle don’t even bother envisioning that world or telling us what its rules are, adopting an anything-goes attitude that ultimately destroys the entire conceit—especially in a sequence in the final reel that might be an emotional topper for some but effectively destroys the basic idea. (Without spoiling the moment, didn’t the songs have to come from somewhere, even in Curtis’ alternative reality?)

Setting side that major concern for now, suffice it to say that the protagonist is Jack Malik (Himesh Patel), an Indian-British schlub who works as a stockboy in a mega-store but moonlights singing his own songs on boardwalks and at little gigs arranged by his manager Ellie (Lily James), a teacher who’s obviously loved him since they were kids but whom he chooses to treat only as a buddy. He’s miserably unsuccessful—only a few friends, like nutty Nick (Harry Michell), even come to his shows. He’s on the verge of giving up when he’s struck by a bus while riding his bike home just when the aforementioned blackout hits, and when he wakes up, having lost a couple of front teeth that are soon replaced, he gradually realizes that nobody knows of any of the Beatles songs but him; Googling the band’s name, in fact, just brings up images of insects. It’s as though they’d never existed.

So Jack, dreaming of fame, reconstructs the music and lyrics of as many of the tunes as he can—the major hits, mostly—and when he plays them they’re immediately recognized as masterworks. In no time at all he’s invited by Ed Sheeran, no less, to appear as his opening act on a concert tour, and even “bests” the singer in a ten-minute song-writing contest. Sheeran’s cutthroat manager Debra Hammer (Kate McKinnon)—even her name is characteristic of Curtis’ bludgeoning approach—immediately signs him up, intending to turn him into the biggest thing in pop music through a clever marketing campaign of concerts and web previews leading up to the release of a full album. The plan’s a huge success, and Jack takes on a goofy old friend, Rocky (Joel Fry), as his aide. He also pretty much drops Ellie, who takes up on the rebound with nice guy Gavin (Alexander Arnold), who first recorded Jack’s rendition of the songs.

Jack’s fame explodes in the lead-up to the album release, which will coincide with a huge concert. But by this time he’s having misgivings about what he’s doing—both with the songs and with Ellie. Will he eventually do the right thing in each case? What do you think?

Perhaps had Curtis taken his scenario in an edgier direction—having modern audiences reject the Beatles songs, for instance (the sort of unexpected twist Serling might well have embraced)—the result could have been more interesting. As it is, he chose to go in the most obvious route, in both in the music-business thread and the romantic one, and his jokes are less witty than juvenile. He also opts for random gags about other forgotten pop culture phenomena late in the action, just for an easy laugh (the revelations lead nowhere). Boyle and cinematographer Christopher Ross attempt to energize things with all sorts of zany camera moves and visual effects, and editor Jon Harris adds to the effort to gin things up with flashy cuts, but the result obstinately refuses to take off.

It doesn’t help that Curtis tries to leaven the screenplay with bits designed to engender suspense—red herrings that figuratively smell. The most important involves the appearance of a couple of stalkers who turn out to be less of a threat than we’re led to believe, especially in a tacky dream sequence about Jack’s appearance on James Corden’s TV show. But are we really supposed to feel sorry for the guy who’s trying to win fame by stealing other people’s creations?

Part of the problem is Patel, who seems a likable fellow but makes a colorless “hero.” His renditions of the songs strike no sparks, and his dithering over Ellie doesn’t either. Collins is stuck with a thankless part of a jilted lover, to which she responds by trying to show her pain by constantly biting her lower lip—a true sign of an actor’s desperation over a poorly-written role. Fry fails to deliver the laughs that, as a second banana, he’s meant to do, and one has to feel a bit sorry for Sanjeev Bhaskai and Meera Syal, who are stuck trying to eke some chuckles out of Jack’s sitcom stereotypical Indian parents. As for Sheeran, he’s undoubtedly a good sport, but as he previously showed in “Bridget Jones’s Baby,” his acting ability is somewhat limited.

The only person who shines, in fact, is McKinnon. She’s playing to her strength as a tough-as-nails, cynical manipulator, but though the satire of the nastiness of the music business she represents is hardly sharp, at least she brings some zest to what is otherwise a fairly dull party. As the head of marketing at the record label Jack becomes attached to, Lamorne Morris has a long monologue about potential album covers that’s meant to have an impact similar to that of the diatribe Ned Beatty delivered in “Network,” but though the actor registers strongly, the jokey speech itself doesn’t come close to matching Chayefsky’s.

For some viewers merely being reminded of how much they love the music of their favorite band will be enough. So if you’ll be satisfied with a splashy but cheesy jukebox musical fantasy featuring some the Beatles’ greatest hits, indifferently delivered though they might be, “Yesterday” will be your cup of tea. But in spite of Boyle’s virtuosity, the movie isn’t much better than “Mama Mia.” One might hope for an electrical outage that will drive it out of our collective memory at one fell swoop.