Fix for #728.
Now it only sends the selected item on the url, and calculates the hierarchy on server side