Question: Sometimes after I shut off Wi-Fi using the button inside the notification bar drop-down, I can't turn it back on with that button. Hitting the button does nothing, it's not even highlighted. When I go into `Settings -> Wireless and network -> Wi-Fi settings` the status under "Wi-Fi" shows Error. If I click "Wi-Fi" to turn it on from here, it usually turns on without any problems. Occassionally I have to reboot to fix it.

Is there a fix I can use to make the TouchWiz Wi-Fi button work the same as enabling/disabling the Wi-Fi in Settings? Or, ideally, is there some way I can prevent the Wi-Fi from getting into an error state when I turn it off and back on?

I have a Galaxy S Vibrant running 2.2, but this has been reported on other Samsung phones as well ([example](https://android.stackexchange.com/questions/12233/wifi-error-when-turning-on-closed)).

Answer: 
I've had the same thing happen to me on my LG G2X running CyanogenMod. So I don't think it's related to your specific device or software. Moderate success has been reported using the "[FXR WiFi Fix And Rescue](https://market.android.com/details?id=com.brilliapps.wifiandmorefixer&hl=en)" app, and it's been tested on the Vibrant. You can also try [WiFi Fixer](https://market.android.com/details?id=org.wahtod.wififixer).
My belief is that this is a bug in google backing up remembered access points and unnecessarily restoring them. Try long clicking each remembered access point and select forget, next setup each access point password as you reconnect to each (or manually if you remember the ssid).