Subaru Repair: 2000 subaru outback ltd. transmission and other issues, subaru outback ltd, gas guzzler


Question
I have a 2000 subaru outback ltd. AWD wagon with 92,000 miles, AT.  From approx. 37 days after my purchase of the car, the check engine light came on. (Notice the close proximity to 30 day dealer warranty).  It would go off after a couple days, then come back on.  It now stays on constantly.  The dealer replaced a faulty knock sensor (he said), and it still stayed on.  When coding it, it again said knock sensor. But then, it began having issues with going into gear - it moves easily into Rev., but not forward gears.  Sometimes it doesn't do it at all, other times it takes a few minutes for it to move into gear. This is from a parked position. My husband has replaced the trans. filter and fluids, and then flushed it again about a month later.  It helped some, but not for long.
Second, when looking under the dashboard, I noticed a green plug on the right side of the dash that was unplugged.  Upon plugging it back in and starting the car, the engine compartment started making a rattling racket similar to a fan belt that's loose.  What is the plug ?  Obviously, an unscrupulous dealer had it unplugged for the sale of the vehicle, but I assume if it's there, then it's supposed to be working !  
Third, and last, going up hill, my car has begun to be very sluggish and "hitches" slightly, losing power.  This thing is a gas guzzler and runs, and smells,  "rich".
Ok, easy on me now, I know in hindsight I got taken by a very smart used car dealer who swore up and down the car was always maintained and ran beautifully...and now I'm living with the problem (I hope his conscience keeps him up at night)..... anyway, I don't have a lot of car knowledge though I'm learning the hard way !  Help if you can would be a great first step before I go to a Subaru dealer and they rake me over the coals there too.

Answer
Ok,

First of all disconnect the green connector immediately.  It's  the "D" check connector, which puts the car in dealer check mode and is used to check the function of solenoids and actuators. You should not drive the car for any distance in D mode ay all.

A transmission with symptoms really should never be flushed at all ever.

Here is what you need to do, source out someone local to you who specializes in Subaru, let them do a full evaluation of the car.  Or at least buy a factory Subaru repair manual and read it before attempting any more repairs your self.  

There are hundreds of reasons as to why a check engine light can come on.  There is no way to control when the vehicles computer will command on the check engine light at all and I doubt that anyone set out to defraud you in any way.

Electrical issues can creep on the most meticulous of maintained cars just as easy as they can on the ones that are not maintained.

I understand your frustrations, I truly do but I need you to understand that you are going about the whole process the wrong way if you want positive results.  

If a used car dealer sells you a car and later you find out they bought it from an auction full of flooded cars and did not disclose it to you, then you can feel ripped off, or the used car dealer knew the car was in a severe accident, or it needed brakes, then you should feel taken advantage of.  

But it is just not fair to bad mouth a dealership based on your frustrations and not understanding how your car works.

I am completely unbiased here

When you started having transmission problems the first step should have been taking it to a good repair shop for an evaluation. In many cases an electrical problem with a transmission will set a check engine light. And if not properly diagnosed can lead to major repairs.

Was the car driven in "d" mode very long? That is not good for the transmission at all.