Jump to content

Extension talk:SyntaxHighlightThemes

Add topic
From mediawiki.org
Latest comment: 7 months ago by TaylanKammer in topic "BadMethodCallException" from load.php

"BadMethodCallException" from load.php

[edit]

Getting this in the browser's console every time I load any page. It seems that load.php catches the exception and turns it into a JS snippet that logs it with a console.error() call. Need to enable $wgShowExceptionDetails to get the full stack trace, otherwise it only says "BadMethodCallException". Stack trace line #9 indicates that it comes from this extension.

[6afca5bc934bfebb41a03c1a] /w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector   BadMethodCallException: Sessions are disabled for load entry point
Backtrace:
from /var/www/bg3/w/includes/session/SessionManager.php(900)
#0 /var/www/bg3/w/includes/session/SessionManager.php(248): MediaWiki\Session\SessionManager->getSessionFromInfo()
#1 /var/www/bg3/w/includes/WebRequest.php(841): MediaWiki\Session\SessionManager->getSessionForRequest()
#2 /var/www/bg3/w/includes/user/User.php(1117): WebRequest->getSession()
#3 /var/www/bg3/w/includes/user/User.php(438): User->loadFromSession()
#4 /var/www/bg3/w/includes/user/User.php(1660): User->load()
#5 /var/www/bg3/w/includes/user/User.php(2312): User->getId()
#6 /var/www/bg3/w/includes/user/UserOptionsManager.php(645): User->isRegistered()
#7 /var/www/bg3/w/includes/user/UserOptionsManager.php(497): MediaWiki\User\UserOptionsManager->getCacheKey()
#8 /var/www/bg3/w/includes/user/UserOptionsManager.php(148): MediaWiki\User\UserOptionsManager->loadUserOptions()
#9 /var/www/bg3/w/extensions/SyntaxHighlightThemes/includes/ResourceLoaderSyntaxHighlightThemeModule.php(20): MediaWiki\User\UserOptionsManager->getOption()
#10 /var/www/bg3/w/includes/ResourceLoader/FileModule.php(525): ResourceLoaderSyntaxHighlightThemeModule->getStyleFiles()
#11 /var/www/bg3/w/includes/ResourceLoader/FileModule.php(626): MediaWiki\ResourceLoader\FileModule->getFileHashes()
#12 /var/www/bg3/w/includes/ResourceLoader/Module.php(928): MediaWiki\ResourceLoader\FileModule->getDefinitionSummary()
#13 /var/www/bg3/w/includes/ResourceLoader/StartUpModule.php(224): MediaWiki\ResourceLoader\Module->getVersionHash()
#14 /var/www/bg3/w/includes/ResourceLoader/StartUpModule.php(425): MediaWiki\ResourceLoader\StartUpModule->getModuleRegistrations()
#15 /var/www/bg3/w/includes/ResourceLoader/Module.php(817): MediaWiki\ResourceLoader\StartUpModule->getScript()
#16 /var/www/bg3/w/includes/ResourceLoader/Module.php(786): MediaWiki\ResourceLoader\Module->buildContent()
#17 /var/www/bg3/w/includes/ResourceLoader/Module.php(925): MediaWiki\ResourceLoader\Module->getModuleContent()
#18 /var/www/bg3/w/includes/ResourceLoader/ResourceLoader.php(701): MediaWiki\ResourceLoader\Module->getVersionHash()
#19 [internal function]: MediaWiki\ResourceLoader\ResourceLoader->MediaWiki\ResourceLoader\{closure}()
#20 /var/www/bg3/w/includes/ResourceLoader/ResourceLoader.php(699): array_map()
#21 /var/www/bg3/w/includes/ResourceLoader/ResourceLoader.php(798): MediaWiki\ResourceLoader\ResourceLoader->getCombinedVersion()
#22 /var/www/bg3/w/load.php(53): MediaWiki\ResourceLoader\ResourceLoader->respond()
#23 /var/www/bg3/w/load.php(39): wfLoadMain()
#24 {main} load.php:31:48
    <anonymous> https://bg3.wiki/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector:31

TaylanKammer (talk) 01:02, 22 July 2023 (UTC)Reply

Created a pull request on GitHub to solve this:
https://github.com/kuenzign/SyntaxHighlightThemes/pull/2 TaylanKammer (talk) 14:47, 24 April 2024 (UTC)Reply