Other mistake: In the final scene, Kirk is still in the transporter room, but does not have on a visor when the ambassador transports out. Even if he did, humans can still go mad if wearing one and that's why Spock operates the transporter. Spock has his visor on, but then you see Kirk walk out of the transporter room without a visor and he is not going mad.
Factual error: The Enterprise accidentally travels a short distance outside the galaxy and can't find its way back. But they'd have to travel for months to get so far outside the Milky Way that they couldn't, well, just turn around in the void and see it. Our galaxy is huge. 100,000 light years across. Very huge. And that barrier may surround the galaxy, but even it is big, pink and visible.
Plot hole: When the Medusan Ambassador Kollos and Dr. Jones materialize, the latter is wearing a protective visor and Mr. Spock can see that. Spock then mistakenly addresses Dr. Jones as Ambassador Kollos. Spock's suddenly illogical mistake seems odd: why should the Ambassador need to wear a visor? Shortly after, why do both Jones and Spock wear visors while carrying the Ambassador's still closed gasket to his cabin? (00:01:45)