I found something!
There has been a change to the way site code works.
In my site code, I change properties of elements that are in the site header (mostly ‘show()’ and ‘hide()’)
When pages with the header are active, the code works fine.
When a lightbox (which has no header) is active those statements are syntax errors.
This used to work, but now it doesn’t.
How do I get around this?