Today’s quirky discovery: a Google Map that I’d made with the excellent Google Map Shortcode worked in the blog when I was logged in, but when didn’t work when I was logged out.
Investigation of the source code of the page showed that the plugin was trying to create a JSON object, but when logged out, a link had a double-quote:
As you can see from the syntax colouring, this breaks the JSON, leading to a syntax error, leading to the map not being created.
It should look like this:
Oddly, the Google Maps Shortcode plugin settings page shows a perfectly valid use of single quotes:
This would make sense: something disabled when a superuser is logged in, and which is rewriting links… which the plugin does, in order to get better data:
Sure enough, disabling that setting makes the problem go away.
So: if your Google Maps shortcode doesn’t work when logged out, suspect a Google Analytics plugin rewriting your links.