More often than not, it's a bad adapter.
You might want to inspect the port for lint/gunk or bent pins though before getting a new one.
I've had issues with various third party display adapters on MacBooks of all different years. Some work, some really don't. Apple's adapters almost always work. And Monoprice ones are usually alright. Other than that, it's hit or miss.
I've got an Apple mini-DVI to DVI adapter I used on an '08 MacBook to hook to a 1080p monitor and it was perfectly fine.
Did it work before Yosemite? I think I tried using it on my Early '09 and it was working under Yosemite. I know it did on 10.6 and 10.9.