I don’t see anything obviously wrong there, assuming you know correctly which site ID you’re trying to get (you could also just use read with the ID). You might check to see whether what you’re getting as $globalMenu is a SiteRepresentation or null to get a better idea of where your problem might lie.
Thanks!
I changed searchOne to read. The site representation seems right because $globalMenu->slug() gives me the correct site slug. And I correctly see $globalMenu’s slug instead of the current site slug. I guess it’s good to know I’m getting the right site representation. Maybe, hopefully, @Daniel_KM will chime in about using the site option in his module.
Just a quick idea from a look at that code: what happens if you make a menu in the “other” site with the same name as the one you’re trying to read from site 3? It looks like there might be a check against the menu name that happens really early there, so it might be the case that if you do have a same-named menu in the current site, then the load of the menu from the other site would work.
Of course I’m just looking briefly at someone else’s module here but it’s worth a try both as a possible workaround and useful extra information to tell the developer if it works.