Description
Futon may navigate you to a _view that no longer exists when returning to the database's browser, causing the interface to break.
Steps to reproduce:
1. View an existing _view in Futon (ex., http://localhost:5984/_utils/database.html?foo/_design%2FuserInfo%2Fbar)
2. Browse to the design document - I just clicked on the "_design/userInfo" link on the right side of the "View code" box.
3. Edit the design document, removing the _view we were just at (in this case, "bar").
4. Save the design document.
5. Return to the database's overview. I clicked on the "Overview > foo" link in the top navigation bar.
Error message(s):
1. Firebug reports the following...
viewCode is undefined
http://localhost:5984/_utils/script/futon.browse.js?0.9.0
Line 298
2. Firebug reports the following...
document.body is null
http://localhost:5984/_utils/script/jquery.js?1.3.1
Line 3085
The cause:
When you return to the database's browser, whether from the Futon Overview page or a direct link, Futon attempts to return to the previous view, which we just removed from the design document.
Temporary fix:
You need to change the URL in the address bar to something valid (ex., specify a _view that's valid). If you try to go back to the Futon Overview page and then click on the database, it will simply redirect you to the invalid view again.