zh.wiktionary.org/w/opensearch_desc.php /srv/mediawiki/php-1.28.0-wmf.1/includes/session/SessionManager.php:985 BadMethodCallException Sessions are supposed to be disabled for this entry point /srv/mediawiki/php-1.28.0-wmf.1/includes/session/SessionManager.php:301 /srv/mediawiki/php-1.28.0-wmf.1/includes/session/SessionManager.php:235 /srv/mediawiki/php-1.28.0-wmf.1/includes/session/SessionManager.php:185 /srv/mediawiki/php-1.28.0-wmf.1/includes/WebRequest.php:700 /srv/mediawiki/php-1.28.0-wmf.1/includes/user/User.php:1211 /srv/mediawiki/php-1.28.0-wmf.1/includes/user/User.php:405 /srv/mediawiki/php-1.28.0-wmf.1/includes/user/User.php:5171 /srv/mediawiki/php-1.28.0-wmf.1/includes/user/User.php:2793 /srv/mediawiki/php-1.28.0-wmf.1/includes/context/RequestContext.php:363 /srv/mediawiki/php-1.28.0-wmf.1/includes/StubObject.php:197 /srv/mediawiki/php-1.28.0-wmf.1/includes/StubObject.php:159 /srv/mediawiki/php-1.28.0-wmf.1/includes/StubObject.php:104 /srv/mediawiki/php-1.28.0-wmf.1/includes/StubObject.php:129 /srv/mediawiki/php-1.28.0-wmf.1/includes/Title.php:1752 /srv/mediawiki/php-1.28.0-wmf.1/includes/Title.php:1846 /srv/mediawiki/php-1.28.0-wmf.1/opensearch_desc.php:85 /srv/mediawiki/w/opensearch_desc.php:3
opensearch_desc.php needs to return a "template" URL for Special:Search on which browsers can do a string replacement to get the actual search URL. That includes calling Title::getLocalURL which might need to replace variant parameters in the URL for variant wikis, and for that it needs to check whether the page language matches the site language. For that it needs to access $wgContLang, and that seems to be an instance of StubUserLang. Not sure how that can happen.