Laravel

And The Most Innocent Of Changes Can Cause Weird Behavior Down The Line - Blog Posts

4 years ago

Strange bug

I had a very strange bug today. We have a web application that makes extensive use jQuery and a third-party JavaScript library to serve up some tasty-looking data grids.

In the grids are some date columns, which are to be formatted "MM/dd/yyyy" (i.e. "02/24/2021").

Things looked great on my local machine. They also looked great in our development environment. When published to production however, these dates suddenly reverted to ISO 8061 format ("2021-02-24T00:00:00").

Standard practice is, of course, to try and determine what key differences exist between these three locales (even though ostensibly there shouldn't be any).

Well... The libraries are being served up externally, so it's not that. The grid configuration is the same; so rule that out. The data is identical.

The only difference is that the local and development versions are compiled for debug, and the production version is compiled for release.

And lo! What do you know - that was the critical difference.

It's worth stressing here though: that's crazy. It would be like a car refusing to start because you added a bumper sticker. At no point, logically, should the compilation mode affect what's going on with the front end.

And yet here we are...


Tags
Loading...
End of content
No more pages to load
Explore Tumblr Blog
Search Through Tumblr Tags