You will be redirected back to your article in seconds

Optimism that everybody will begin loving “Raymond” again is rooted in the fact that most contract disputes in the past decade have been resolved peacefully — even the nasty ones.

And things couldn’t get uglier than Gandolfini’s smackdown with HBO earlier this year. Thesp fired the first salvo, filing a megasuit to void his “Sopranos” contract after the pay cabler refused to meet his salary demands.

HBO then countersued with a $100 million breach-of-contract charge, noting that he was still signed to do the series.

Realizing that it was in both parties’ best interest to keep “The Sopranos” going, Gandolfini and HBO ultimately renegotiated the thesp’s contract, meeting in the middle. With salary and syndication advances, he is expected to pull in about $13 million for season five.

Gandolfini had more leverage than most — there is no “Sopranos” without his Tony Soprano character, after all. Same was true with “Malcolm in the Middle” mom Jane Kaczmarek, whose “migraine” headaches kept her off the set for several days, until a new paycheck suddenly made the pain go away.

That wasn’t the case with the supporting cast of “Becker,” which first staged a sickout, then skipped work for two days in early September 2001 after filing a breach-of-contract suit against producer Paramount.

The actors had argued that Par reneged on a written agreement to renegotiate a raise. Par, meanwhile, had said that it would discuss a raise after the show was sold into syndication.

The cast eventually dropped the suit and went back to work, although it was unclear whether their demands were ever met. Execs at the time, however, noted that the supporting cast could have been easily replaced had the dispute continued.

Twentieth Century Fox TV took it even one step further when four cast members of “The Simpsons” banded together in a quest for more coin in 1998. The studio hired casting directors in several cities to scout out replacements for Dan Castellaneta, Yeardley Smith, Hank Azaria and Harry Shearer when contract talks stalled.

Both sides eventually settled on a new episodic fee and backend compensation issues.

Then there was the “Seinfeld” cast, which almost held up the final season of the hit laffer when a stalemate threatened to end the show.

Jason Alexander, Julia Louis-Dreyfus and Michael Richards eventually picked up $600,000 an episode for that last year, but not before NBC let the cast sweat it out. Producer Castle Rock eventually came to the rescue.

All happy endings — and quite a contrast to the hardball plays of the 1970s and ’80s that saw several series lose major stars over contract disputes.

The most famous of them all, of course, continues to be Suzanne Somer’s decision to walk away from “Three’s Company” when her salary demands weren’t met. In the end, “Three’s Company” continued for several years, while Somers wound up hawking the ThighMaster.

Eventual SAG prexy Valerie Harper also found out that having a show named after you doesn’t mean you can’t be replaced. The star of NBC’s “Valerie,” Harper ended up leaving the show when her salary ask wasn’t met.

The network then killed off her character (in a sitcom!), renamed the show “Valerie’s Family” (later “The Hogan Family”) and hired Sandy Duncan to lead the show.

Of course, nothing’s ever permanent. When John Schneider and Tom Wopat left “The Dukes of Hazzard” in a huff, both the show and the thesps suffered. As a result, both sides came to terms and Schneider and Wopat returned to the show a few months later.