When Linda Woolverton wrote the script for what became Tim Burton’s “Alice in Wonderland” in 2010, she was constrained by the fact that the prospective audience would know something of Lewis Carroll’s classic 1865 book, even at second-hand via an adaptation such as Disney’s 1951 animated film. That didn’t stop her and Burton from major surgery, but still one could glimpse, though rather dimly, a shadow of the original. In dealing with Carroll’s 1872 successor volume, however, she apparently felt almost totally liberated from the source, which is even less widely read nowadays and in any event would seem utterly resistant to direct retelling on the screen. (Witness the slightly more faithful, but terrible, Australian animated version of 1987.) In any event, there’s little left of Carroll in this new “Alice Through the Looking Glass” beyond the title.

Still, that might not be a major problem were the new narrative that Woolverton has concocted something more than a dreary recitation of clichéd contemporary nostrums, albeit one decked out in all the flashily empty finery that state-of-the-art CGI can deliver. The movie ultimately comes down to the usual lessons: the overriding importance of family, the need to reconcile rather than harbor old grievances, and an injunction to tell the people you love how you feel about them while there’s still time—in other words, precisely the sort of mawkish claptrap that one gets in movie after movie nowadays, and that probably would have made Carroll wince (or worse).

The picture is also about the Mad Hatter, a character who’s at best a peripheral presence in the original book (some would say he doesn’t appear at all) but becomes the centerpiece of this story. Why? The reason is obvious: he was played in Burton’s movie by Johnny Depp in full Willy Wonka mode, and Depp was available for the sequel. So Woolverton’s script relates how Alice—again played by Mia Wasikowska as a considerably older version of Carroll’s little girl—saves the Hatter from dying of the grief he feels over the disappearance of his family years ago in a Jabberwocky attack. To do so she has to travel back in time and prevent their deaths—or prove they weren’t killed after all. But that’s not all the personal healing that her trip entails: we learn that the ferocity of the Red Queen (Helena Bonham Carter, another returnee), was engendered by a lie told by her sister the White Queen (Anne Hathaway) when they were children, and they reconcile, too. As if that weren’t enough, Alice and her mother (Lindsay Duncan), who have been at odds, make up as well. The only consolation is that everybody doesn’t link hands and sing “Kumbaya” at the end.

As to particulars: Alice is introduced as the intrepid captain of her late father’s ship The Wonder, using daring moves to escape pirates in dangerous seas. Returning to England, she’s distressed to discover that her mother has mortgaged their house to her boss (and erstwhile suitor), sleazy Hamish (Leo Bill), and to save one she must surrender the other. But shortly the caterpillar-turned-butterfly Absolem (voiced by the late Alan Rickman) leads her through a mirror back to Underland, where a bevy of the characters she befriended in the last film inform her of the Hatter’s dire despondency. They tell her that she alone can travel back through the years to save his family, but doing so will require purloining the device known as the Chronosphere from its master, Time (Sacha Baron Cohen), a mustachioed figure out of a Johann Strauss operetta who oversees all temporal events through clocks big and small, assisted in his work by a battery of clattery metal minions that can, when faced with an emergency, consolidate into one large robot.

Alice manages to zoom off into the past inside the stolen Chronosphere, with Time in hot pursuit. Passing through tunnels of watery ooze modeled after the big-wave ocean swells familiar from surfing movies, they travel back to significant days that reveal the disappointment the Hatter’s father, the elder Hightop (Rhys Ifans), felt in his son and the Hatter’s failure to save his family from the dragon-like Jabberwocky. The journey also discloses how the Red Queen became the virago she is and the role she played in the Hightop family’s tragedies. Rectifying one of those connected occurrences, it turns out, will change the other as well.

It’s ironic to find the makers working so hard to make narrative sense out of all this, when Carroll’s point was to revel in the illogicality in the incidents he was fashioning. Woolverton’s need to explain everything—the Hatter’s madness most notably—in the most mundane way is a major blunder that sets this “Alice” at a greater remove from its supposed source than all its pedestrian narrative inventions do. The film is a betrayal of Carroll in spirit as well as letter—certainly nothing could be further from his attitude than the misguided sequence showing the heroine briefly committed to a lunatic asylum and threatened with a spectacularly large syringe.

Still, the audiences that flocked to “Alice in Wonderland” will probably find this garish travesty to their taste, too. Certainly the visuals are consistently eye-popping, especially in IMAX 3-D, and one has to give credit to the effects team and cinematographer Stuart Dryburgh for seeing to it that the live-action footage meshes so well with the CGI. Director James Bobin, who did the recent Muppets movies, keeps things moving with the help of editor Andrew Weisblum, and Danny Elfman’s score works overtime to pump energy and whimsy into the mix, even if it’s not only of his more distinctive efforts.

As to the onscreen human contributions, Wasikowska is again an agreeable presence, even if turning Alice into a feminist icon is yet another way in which the screenplay deviates radically from its roots. Depp does what has more and more become his default off-the-wall style, more clown than actor; these sorts of turns haven’t ruined him, as “Black Mass” recently proved, but they’ve done him no good. Carter repeats her screeching banshee from the last picture, which is growing a miter tedious, but it’s Cohen who’s the most prominent scenery-chewer this time around, though the lack of wit in his heavily-accented lines leaves him singularly unfunny, while the mugging of Ifans and Bill as Father Hightop and Hamish is positively embarrassing. It makes the laid-back manner of El Speleers, as Hamish’s handsome aide, and Hathaway’s blissfully vacant expression, particularly refreshing. The extraordinary array of voice talent that includes Stephen Fry (the Cheshire Cat), Michael Sheen (the White Rabbit) and Timothy Spall (as the drowsy bloodhound Bayard) is mostly heard in brief, unimpressive snippets, but it’s good to have Rickman’s mellow tones on film one more time.

One might be moved to say that this “Alice” is only a pale reflection of Carroll’s imaginative masterpiece, but with all the changes it’s barely a reflection of the book at all.