We inherited a solution that consists of a number of sites build with MVC. The solution has been upgraded to 10.2(.1) and we have added a new headless site using SXA and JSS. So we have a dozen "regular" sites and 1 SXA site.
We noticed that we have an issue in the experience editor when using the navigation bar in the SXA site. Apparently the site resolving is not correct on that part as it links to the first non-SXA site it can find.
The url when the editor opens is like /?sc_mode=edit&sc_itemid=...&sc_lang=en&sc_version=1&sc_site=portal. But when we then use the navigation bar to go to another page we get an error because the sc_site parameter in the url is wrong: /site1/?sc_mode=edit&sc_itemid=...&sc_lang=en&sc_site=site1&sc_ee_fb=false.
When we manually change the sc_site parameter the page works.
How can we get the navigation bar to use the correct site?