`ContextMenu.add(String, String)` calls `Menu.<init>(String, String, String)` which calls `withUrl` which seems to be expecting a relative path. Should rather call

    menu.add(new MenuItem().withContextRelativeUrl(view.getUrl()).withDisplayName(view.getDisplayName()));

I guess.