“Yesterday” is a comedy/fantasy based on a simple idea.

Jack Malik is a British singer/songwriter who’s been trying to get his music career going for ten years, but no one seems to care, except his friend/manager Ellie, who’s stuck by him since they were teenagers. When Jack does live gigs, the crowds are sparse and don’t pay any attention. He needs a miracle — and gets one via a 12-second worldwide blackout, after which he’s the only person in the world who remembers The Beatles.

When Jack references John, Paul, George, and Ringo, no one — including Ellie — knows what he’s talking about. Even Google has never heard of them. The movie doesn’t explain what happened, nor its global implications, sticking instead to the story of this single man who discovers he’s the only one who knows anything about the most popular band of all time.

Jack decides to pretend that he’s the one who wrote all those songs, and his life begins to change. Soon, Ed Sheeran gets in touch, and gives Jack a gigantic boost by inviting him to open for Ed on the road. That gets the attention of Sheeran’s manager, Debra, who sees an opportunity to exploit Jack and his music with a record deal and much more.

Jack starts having some pangs of guilt, because these classic songs — which seem new to others — aren’t his. Meanwhile, he can’t seem to realize that Ellie is the woman for him. Since this is a Richard Curtis script (“Notting Hill,” “Four Wedding and a Funeral,” “Love Actually”), you can be sure they’ll end up together in the end, but what about Jack’s career?

Himesh Patel (known in the UK as one of the stars of “East Enders”) plays Jack with the right touch of disbelief, and sings well enough. He doesn’t sound like a rock star, just a regular guy with a good voice singing songs he loves. He’s especially good in several scenes where he’s trying to remember the lyrics to Beatles classics (in “Eleanor Rigby,” what the hell did Father McKenzie do again??). He can’t Google them (it keeps giving him search results about beetles) and the Fab Four albums he had in his collection have mysteriously disappeared.

Lily James (“Downton Abbey,” “Baby Driver”) is lustrous as Ellie, who is clearly attracted to Jack but getting a bit sick of the unrequited love thing. The best performance in the movie comes from Ed Sheeran, who gives a nice subtle performance and doesn’t mind poking a little fun at himself.

Then there’s Kate McKinnon as Debra. I fear that she is falling into the same hole that swallowed up the movie careers of Gilda Radner, Dana Carvey, Phil Hartman, and others who were great sketch players on TV, but who couldn’t find success on the big screen despite repeated efforts. In “Yesterday,” McKinnon plays every scene too broadly, overdoing many lines with an unnatural delivery or facial expression. That’s fine for a caricature or impression on “Saturday Night Live,” but too much when you’re in a movie ensemble.

I’m reminded of a story Jack Lemmon told about his movie debut. After the first take of his first scene, director George Cukor called him over and said, “Do less, Jack.” Lemmon nodded his head and pulled back a bit in the second take. Again, Cukor took him aside and said, “Less, Jack.” Lemmon, eager to please, tried it again, only to have Cukor give him the same advice. At this point, Lemmon said, “Mr. Cukor, if I do any less, I won’t be acting at all!” Cukor replied, “Exactly.”

It’s too bad director Danny Boyle (“Slumdog Millionaire,” “Trainspotting”) didn’t give McKinnon those same words of advice. In fact, I wish Boyle himself had done less (e.g. he used huge, distracting graphics to tell us the locations, and shot one completely unnecessary scene in the Mersey Tunnel under Liverpool), but mostly, he gets the tone right.

“Yesterday” is fun and funny, the relationship between James and Patel works nicely, and the music is certainly great. There are some 17 Beatles tunes performed in the movie, which cost the production a reported $10 million in rights fees. They’re all great to hear, but I wonder why anyone would buy the soundtrack album when you can have the real thing.

I give “Yesterday” an 8 out of 10.