Given the unfortunate title of this romcom from the director and two of the writers of “Legally Blonde,” it would be easy to come up with some appropriately nasty remark about “The Ugly Truth.” We’ll leave that to others, and simply say that the movie plays like a busted Fox sitcom pilot, though heavier on the raunchiness and dragged out to a literally painful hour and a half.

The lame plot has a lot in common with a terrible Ashley Judd-Hugh Jackman comedy of 2001 called “Someone Like You,” with a dollop of “Cyrano de Bergerac” tossed in for good measure. Katherine Heigl plays Abby Richter, the hard-driving producer of a Sacramento morning TV talk show starring husband-and-wife anchors Larry (John Michael Higgins) and Georgia (Cheryl Hines) that’s tanking in the ratings. But Abby’s confident, take-charge style is a turn-off on the dating scene, and she spends most of her evenings at home, with her inevitable cat.

To boost the show’s chances of survival Abby’s boss books as a regular contributor—much against her wishes—Mike Chadway (Gerard Butler), an abrasive cable-access personality who specializes in rants about what men naturally want and how women had better learn to cater to them or get resigned to living alone. He inexplicably becomes an overnight sensation with viewers. Naturally Abby and Mike spar over everything, which of course makes it obvious that by the picture’s end they’ll have fallen in love.

The catalyst is the “Cyrano” shtick. When Abby bumps into hunky new neighbor Colin (Eric Winter), an orthopedic surgeon, in one of those grotesquely cute meeting scenes apparently mandatory in this sort of fluff (in this case it involves her cat, a tree in the courtyard, and a view of her undies as she hangs upside-down on a branch), she’s so desperate to get him to like her that she enters into a bargain with Chadway. He’ll give her pointers on how to look and what to do (even feeding her lines during one date): if they work, she’ll drop her opposition to his being on the show, and if not he’ll quit.

What follows is supposed to be hilarious, but it’s doomed by dumb writing and flat-footed direction. The Abby character is the biggest problem. As presented here, she’s practically schizophrenic, changing at the drop of a hat from an ultra-competent, self-possessed executive to a completely inept schoolgirl who dances wildly if a guy even looks at her. The implausibility of it all stymies Heigl, who responds with shameless mugging that reaches its nadir in a sequence in which Abby’s trapped in a restaurant wearing vibrating panties Mike’s given her. The idea’s obviously swiped from “When Harry Met Sally,” bit here it’s so clumsily staged and played that it seems interminable. Chadway’s a stock sitcom figure, the rough guy who’s sensitive underneath (as we’re shown early on by his gruff affection for his fatherless nephew), and Butler plays him Jim Belushi style. At least he’s not one of the conventionally handsome leading-man types so common nowadays, but unlike the stars of yesteryear—many of whom weren’t conventionally handsome, either—he has very little charm.

In fact, this bargain-basement Tracy-Hepburn duo, who squabble before falling into one another’s arms, is so mediocre that they shift any sympathy one might have to Winter, who might be playing the expendable third wheel but at least seems a nice fellow, even if he is stuck in an especially awful musical montage with Heigl and that dreadful Cyrano scene at a baseball park, which ends with one of the movie’s crassest and cruddiest gags. The rest of the cast are sub-sitcom level, with Higgins and Hines in particular struggling to overcome dreadful material and failing.

“The Ugly Truth” isn’t even attractive visually, with the soundstage-shot scenes looking chintzy and the exteriors little better. Russell Carpenter’s cinematography is bland, and Aaron Zigman’s score subpar.

One might imagine that given its low quality even in this genre, “The Ugly Truth” would be box-office poison. But when a sorry mess like “The Proposal” earns big bucks, that wouldn’t be a safe bet.