I have a Canon EF 50mm f/1.8 II lens and while I was taking a shot using AF, the lens detached and opened into two parts in the ring at the tip of the lens, and I got an error: "shooting is not possible due to an error". How can I get it back to its normal function?
Not sure this is really an answer, but the following PDF file is an unofficial guide to disassembly of the EF 50mm f/1.8 II:
Hopefully, if you have the appropriate skillset and tools, you can disassemble your lens, find what's wrong with it, and then reverse the disassembly to put it back together. However, some folks say that the reason the front of their EF 50mm f/1.8 II fell out is that something broke inside the lens and it may not be possible to get replacement parts. Because the EF 50mm f/1.8 II is so cheap, however, the idea of destroying it in attempting to repair it may not be an issue, since a service repair might cost more than getting a new copy of the lens, and you may have nothing to lose.