I'm getting errors generated by Googlebot while following invalid URLs. Checking with Google Webmaster tools confirmed that the problem was the bot:
I've checked the source code and the HTML generated, but couldn't find out why Googlebot is finding and following this invalid URLs.
How do I troubleshoot the problem?