Fix SharePoint Foundation 2013 Search


UPDATE: Microsoft released official update to fix the problem: http://support.microsoft.com/kb/2760625.
WSP file is now removed from downloads page, but you can still get source code itself.
This project contains highly experimental code to 'work-around' a problem with search web parts in SharePoint Foundation 2013 after it was broken by some CU (maybe KB2837628 or KB2850058) or SP1.
What I did was:
If you can wait for official fix from MS, then go away :)

If not, you can do the following:
This solution does not fix pages, where original web parts are hard coded. For example /_layouts/15/osssearchresults.aspx.

This work-around should be taken AS IT IS. It may help you, but it will have to be removed once official fix becomes available.

This solution would have been impossible without some code found on internet:
As for the code itself - this is great example of how NOT to code. It breaks all good practices, coding standards, and is not for the weak-hearted. I didn't do any testing, so you will find problems. Fix them yourself.

Good luck.