Sorry @frangipani, we really need a test repo to reproduce your issue. Please read Requesting Help.
Your issue is definitely somewhere in a template, with the URL rendering. I suggest you make a new project, very simple, and try to get only that sidebar working. That often helps folks figure out their issue.