I have just moved into a rented property in spain. My wall socket in my bedroom wouldnt work so my landlord came around and "fixed" it. the socket does work now but only when i have my bedroom light on. So before i go to bed i have to unscrew the bulb so i can charge my phone, watch tv etc. ive got a feeling he just wired the socket to the light switch. Its the only socket in the room. I have spoke to my landlord everyday since but like everything in spain - they will do it tomorrow. Ive been waiting 2 weeks now. Is it something i can fix?
Is it something i can fix?
You are probably able to fix this but you are probably not legally entitled to make changes to the wiring without the landlord's permission.
My guess is that he connected a wire to the wrong side of the switch.
In the UK you cannot mix outlets and lights on the same circuit but I don't know if this is permitted in Spain.
I agree with RedGrittyBrick, this is not a repair you should attempt yourself. Not only could it be dangerous, but also possibly illegal if the laws are anything like they are in the UK. This answer is for informational purposes only.
Based on your description, it sounds like the wiring to the room is wired the same basic way as below. The diagram is based off of US standards, so your wires won't have the same color scheme. In the diagram, the black is hot, the white is neutral is white, and the brown looking wire is a bare copper ground. I looked up the current wiring colors for Spain, and the hot is brown, and the neutral is blue. Depending on when the wiring was done, there may be completely different colors for your wires.
The switch wiring is a little deceptive. Although there is one white wire and one black wire, both wires are actually hot. There is a black marking on the white wire which indicates that it is hot. Usually this is marked with electrical tape.
What I suspect is going on is there is a wiring issue inside of the light. Instead of the outlet being wired as always hot, it is connected to the switched hot. The incoming to wire should be pigtailed (split) so one end of the pigtail goes to the outlet, and the other goes to the switch.