So we are running into a problem that is recurring several times, caught through logs. We are getting loads of undefined variable notices. When we trace where they are supposedly undefined, they are always defined in the matching controller action to the view where it is complaining. We can't figure out how someone is getting to the view either without hitting the controller action, or with hitting it but losing variable definitions somehow.
We tried logging the controller and action whenever a view does this (by checking for undefined vars at thee top of the view), and it always says the correct controller action, so we don't have any unexpected controller actions where the variables aren't defined. It's problematic partially because it's filling up our logs, but we also worry actual users may be getting unexpected results. Does anyone have any idea of a scenario that could cause this?
It has happened with several views that do work fine when tested on our end (we've had several people hit the appropriate urls and the problem doesn't happen). We also checked with a code search, and no other controllers render these views. We have basic safety checks going on for when certain variables are expected in the url; for example, if an id is missing, it will throw a not found exception rather than trying to continue, so we know that's not the cause either.