Check yellow wire for continuity, in other words it is cut or broken, from lamp socket to door switch. If yellow conductor is OK, than check door switch making sure it makes a good ground.
SwitchÂ’s button pops out when door is open grounding to its outer case. There may be some tape or crud keeping switch from making contact.
Yup, try rotating the button on the door switch back and forth to help make a better connection. You may want to ground the switch wire to see if the circuit works. If it does, the switch has a connection problem.... either ground or contact.