I just fixed a very strange issue in our application.
It went something like this:
User would click on a link that opened another page. This page would flash for a second, then another page would open containing just the string "2010".
The bug came from QA as being a regression related to recent development, so i started debugging in the code. There was nothing in the logs.
Then i opened firebug, went into "net" mode and persisted it. I saw my original request made, along with headers, and then another request made, this one had no headers at all.
document.write is evil. There was recently a change to the code which attempted to make the copyright year dynamic by replacing it with
inside of a script tag. This alone wouldn't cause the issue, but document.write only works correctly if its called when the page is being rendered. If the page is rendered, it will overwrite the entire page with whatever its writing out. The issue was the the page the user was going to next, was gotten via ajax, and thus the script was called after the page was loaded, overwriting the entire page.
Oh the glory of being a programmer.
Thursday, December 23, 2010
Monday, December 13, 2010
for /f "tokens=*" %%i in ('dir /b/a/s CVS*') do @rmdir /q /s "%%i"