MediaWiki: Database schema error when searching - mediawiki

I installed MediaWiki on my Mac with MAMP (PHP7.2.10 and MySQL 5.7.23 InnoDB). No error occured and everything except the search works. It shows the following error instead of a result:
[c1af9047a60a292a781befdd] /mediawiki/index.php?search=test&title=Spezial%3ASuche&go=Seite Wikimedia\Rdbms\DBQueryError from line 1457 of /Users/xxx/www/mediawiki/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?
Query: SHOW GLOBAL VARIABLES LIKE 'ft\_min\_word\_len'
Function: SearchMySQL::minSearchLength
Error: 1682 Native table 'performance_schema'.'global_variables' has the wrong structure (localhost)
Backtrace:
#0 /Users/xxx/www/mediawiki/includes/libs/rdbms/database/Database.php(1427): Wikimedia\Rdbms\Database->makeQueryException(string, integer, string, string)
#1 /Users/xxx/www/mediawiki/includes/libs/rdbms/database/Database.php(1200): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#2 /Users/xxx/www/mediawiki/includes/search/SearchMySQL.php(446): Wikimedia\Rdbms\Database->query(string, string)
#3 /Users/xxx/www/mediawiki/includes/search/SearchMySQL.php(402): SearchMySQL->minSearchLength()
#4 /Users/xxx/www/mediawiki/includes/search/SearchMySQL.php(104): SearchMySQL->normalizeText(string)
#5 /Users/bxxx/www/mediawiki/includes/search/SearchMySQL.php(299): SearchMySQL->parseQuery(string, boolean)
#6 /Users/xxx/www/mediawiki/includes/search/SearchMySQL.php(273): SearchMySQL->queryMain(array, string, boolean)
#7 /Users/xxx/www/mediawiki/includes/search/SearchMySQL.php(188): SearchMySQL->getQuery(string, boolean)
#8 /Users/xxx/www/mediawiki/includes/search/SearchMySQL.php(178): SearchMySQL->searchInternal(string, boolean)
#9 /Users/xxx/www/mediawiki/includes/specials/SpecialSearch.php(318): SearchMySQL->searchTitle(string)
#10 /Users/xxx/www/mediawiki/includes/specials/SpecialSearch.php(185): SpecialSearch->showResults(string)
#11 /Users/xxx/www/mediawiki/includes/specialpage/SpecialPage.php(522): SpecialSearch->execute(NULL)
#12 /Users/xxx/www/mediawiki/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL)
#13 /Users/xxx/www/mediawiki/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext)
#14 /Users/xxx/www/mediawiki/includes/MediaWiki.php(861): MediaWiki->performRequest()
#15 /Users/xxx/www/mediawiki/includes/MediaWiki.php(524): MediaWiki->main()
#16 /Users/xxx/www/mediawiki/index.php(42): MediaWiki->run()
#17 {main}
A first attempt was to start the web updater, but /mwconfig/ only allows the download of the LocalSettings.php. No way to actually start it.
Any ideas? Thank you!

I think its a generell Problem with the MySQL installation. Reinstalling the server fixed it.

Related

MediaWiki TemplateParser.php internal error

I have a local wiki (MediaWiki 1.38.4 ; Apache with xampp) that worked perfectly for a few weeks, but today started giving me errors with the TemplateParser.php and now is completely unnaccesible and shows the following error details:
MediaWiki internal error.
Original exception: [3d60e113338e8a53946d26be] /fangirlbook/index.php/P%C3%A1gina_principal TypeError: Cannot access offset of type string on string
Backtrace:
from C:\xampp\htdocs\fangirlbook\includes\TemplateParser.php(134)
#0 C:\xampp\htdocs\fangirlbook\includes\TemplateParser.php(289): TemplateParser->getTemplate(string)
#1 C:\xampp\htdocs\fangirlbook\includes\skins\SkinMustache.php(65): TemplateParser->processTemplate(string, array)
#2 C:\xampp\htdocs\fangirlbook\skins\Vector\includes\SkinVector.php(455): SkinMustache->generateHTML()
#3 C:\xampp\htdocs\fangirlbook\includes\skins\SkinTemplate.php(150): Vector\SkinVector->generateHTML()
#4 C:\xampp\htdocs\fangirlbook\includes\OutputPage.php(2807): SkinTemplate->outputPage()
#5 C:\xampp\htdocs\fangirlbook\includes\MediaWiki.php(926): OutputPage->output(boolean)
#6 C:\xampp\htdocs\fangirlbook\includes\MediaWiki.php(939): MediaWiki::{closure}()
#7 C:\xampp\htdocs\fangirlbook\includes\MediaWiki.php(563): MediaWiki->main()
#8 C:\xampp\htdocs\fangirlbook\index.php(53): MediaWiki->run()
#9 C:\xampp\htdocs\fangirlbook\index.php(46): wfIndexMain()
#10 {main}
Exception caught inside exception handler: [3d60e113338e8a53946d26be] /fangirlbook/index.php/P%C3%A1gina_principal TypeError: Cannot access offset of type string on string
Backtrace:
from C:\xampp\htdocs\fangirlbook\includes\TemplateParser.php(134)
#0 C:\xampp\htdocs\fangirlbook\includes\TemplateParser.php(289): TemplateParser->getTemplate(string)
#1 C:\xampp\htdocs\fangirlbook\includes\skins\SkinMustache.php(65): TemplateParser->processTemplate(string, array)
#2 C:\xampp\htdocs\fangirlbook\skins\Vector\includes\SkinVector.php(455): SkinMustache->generateHTML()
#3 C:\xampp\htdocs\fangirlbook\includes\skins\SkinTemplate.php(150): Vector\SkinVector->generateHTML()
#4 C:\xampp\htdocs\fangirlbook\includes\OutputPage.php(2807): SkinTemplate->outputPage()
#5 C:\xampp\htdocs\fangirlbook\includes\exception\MWExceptionRenderer.php(157): OutputPage->output()
#6 C:\xampp\htdocs\fangirlbook\includes\exception\MWExceptionRenderer.php(76): MWExceptionRenderer::reportHTML(TypeError)
#7 C:\xampp\htdocs\fangirlbook\includes\exception\MWExceptionHandler.php(107): MWExceptionRenderer::output(TypeError, integer)
#8 C:\xampp\htdocs\fangirlbook\includes\exception\MWExceptionHandler.php(202): MWExceptionHandler::report(TypeError)
#9 C:\xampp\htdocs\fangirlbook\includes\MediaWiki.php(585): MWExceptionHandler::handleException(TypeError, string)
#10 C:\xampp\htdocs\fangirlbook\index.php(53): MediaWiki->run()
#11 C:\xampp\htdocs\fangirlbook\index.php(46): wfIndexMain()
#12 {main}
I have already restarted the system, re-installed the wiki and copying the manual backup I had of the files and the database, and no solution. Any ideas?

RuntimeException when running rebuildData.php

I upgraded my MW from 1.31 to 1.33 and SMW from 2.5.6 to 3.1 by following the official tutorials. Everything works fine until Step 6 when I run rebuildData.php to rebuild the data and it throws an exception after about 10000 updates. Here is the exception message:
... updating 10281 [S: User:Reddgamer]
[d55bfb09d717f88aa3e7da6e] [no req] RuntimeException from line 58 of /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/src/SQLStore/Lookup/SingleEntityQueryLookup.php: Expected a ValueDescription instance!
Backtrace:
#0 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/includes/query/SMW_QueryProcessor.php(338): SMW\SQLStore\Lookup\SingleEntityQueryLookup->getQueryResult(SMWQuery)
#1 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/src/ParserFunctions/AskParserFunction.php(364): SMWQueryProcessor::getResultFromQuery(SMWQuery, array, integer, integer)
#2 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/src/ParserFunctions/AskParserFunction.php(197): SMW\ParserFunctions\AskParserFunction->doFetchResultsFromFunctionParameters(array, array)
#3 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/src/ParserFunctions/ShowParserFunction.php(45): SMW\ParserFunctions\AskParserFunction->parse(array)
#4 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/src/ParserFunctionFactory.php(428): SMW\ParserFunctions\ShowParserFunction->parse(array)
#5 /home/example/public_html/dev.example.com/wiki/includes/parser/Parser.php(3528): SMW\ParserFunctionFactory->SMW\{closure}(Parser, string, string)
#6 /home/example/public_html/dev.example.com/wiki/includes/parser/Parser.php(3235): Parser->callParserFunction(PPFrame_DOM, string, array)
#7 /home/example/public_html/dev.example.com/wiki/includes/parser/Preprocessor_DOM.php(1285): Parser->braceSubstitution(array, PPFrame_DOM)
#8 /home/example/public_html/dev.example.com/wiki/includes/parser/Parser.php(3152): PPFrame_DOM->expand(DOMElement)
#9 /home/example/public_html/dev.example.com/wiki/includes/parser/Preprocessor_DOM.php(1285): Parser->braceSubstitution(array, PPFrame_DOM)
#10 /home/example/public_html/dev.example.com/wiki/includes/parser/Parser.php(3049): PPFrame_DOM->expand(DOMElement, integer)
#11 /home/example/public_html/dev.example.com/wiki/includes/parser/Parser.php(1359): Parser->replaceVariables(string)
#12 /home/example/public_html/dev.example.com/wiki/includes/parser/Parser.php(491): Parser->internalParse(string)
#13 /home/example/public_html/dev.example.com/wiki/includes/content/WikitextContent.php(369): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#14 /home/example/public_html/dev.example.com/wiki/includes/content/AbstractContent.php(555): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)
#15 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/includes/ContentParser.php(186): AbstractContent->getParserOutput(Title, integer, ParserOptions, boolean)
#16 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/includes/ContentParser.php(145): SMW\ContentParser->fetchFromContent()
#17 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/src/MediaWiki/Jobs/UpdateJob.php(197): SMW\ContentParser->parse()
#18 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/src/MediaWiki/Jobs/UpdateJob.php(137): SMW\MediaWiki\Jobs\UpdateJob->parse_content()
#19 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/src/MediaWiki/Jobs/UpdateJob.php(94): SMW\MediaWiki\Jobs\UpdateJob->doUpdate()
#20 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/src/SQLStore/Rebuilder/Rebuilder.php(237): SMW\MediaWiki\Jobs\UpdateJob->run()
#21 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/src/Maintenance/DataRebuilder.php(423): SMW\SQLStore\Rebuilder\Rebuilder->rebuild(integer)
#22 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/src/Maintenance/DataRebuilder.php(349): SMW\Maintenance\DataRebuilder->do_update(integer)
#23 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/src/Maintenance/DataRebuilder.php(200): SMW\Maintenance\DataRebuilder->rebuild_all()
#24 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/maintenance/rebuildData.php(202): SMW\Maintenance\DataRebuilder->rebuild()
#25 /home/example/public_html/dev.example.com/wiki/maintenance/doMaintenance.php(96): SMW\Maintenance\RebuildData->execute()
#26 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/maintenance/rebuildData.php(261): require_once(string)
#27 {main
Does someone know why this is happening and how I could get it sorted out?
I created the bug report for you: smw issue 4349

How can I fix backtrace errors in a MediaWiki database?

While I attempted to create a database for my second wiki as a part of a wiki family I have been planning on, I have experienced various errors and access messages. One of these has to do with the user. Even though I have checked all the privileges I could see in my MySQL database manager, the backtrace shows that there are still missing permissions. Please give me information on how to fix these errors and explain what parts of the permissions are missing.
Backtrace:
#0 /home/gjlxrtap/public_html/mw19/includes/libs/rdbms/database/Database.php(979): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#1 /home/gjlxrtap/public_html/mw19/includes/libs/rdbms/database/Database.php(1343): Wikimedia\Rdbms\Database->query(string, string)
#2 /home/gjlxrtap/public_html/mw19/includes/libs/rdbms/database/Database.php(1411): Wikimedia\Rdbms\Database->select(string, array, array, string, array, array)
#3 /home/gjlxrtap/public_html/mw19/includes/user/User.php(1287): Wikimedia\Rdbms\Database->selectRow(string, array, array, string, array)
#4 /home/gjlxrtap/public_html/mw19/includes/user/User.php(496): User->loadFromDatabase(integer)
#5 /home/gjlxrtap/public_html/mw19/includes/libs/objectcache/WANObjectCache.php(892): User->{closure}(boolean, integer, array, NULL)
#6 [internal function]: WANObjectCache->{closure}(boolean, integer, array, NULL)
#7 /home/gjlxrtap/public_html/mw19/includes/libs/objectcache/WANObjectCache.php(1012): call_user_func_array(Closure, array)
#8 /home/gjlxrtap/public_html/mw19/includes/libs/objectcache/WANObjectCache.php(898): WANObjectCache->doGetWithSetCallback(string, integer, Closure, array, NULL)
#9 /home/gjlxrtap/public_html/mw19/includes/user/User.php(521): WANObjectCache->getWithSetCallback(string, integer, Closure, array)
#10 /home/gjlxrtap/public_html/mw19/includes/user/User.php(441): User->loadFromCache()
#11 /home/gjlxrtap/public_html/mw19/includes/user/User.php(405): User->loadFromId(integer)
#12 /home/gjlxrtap/public_html/mw19/includes/session/UserInfo.php(88): User->load()
#13 /home/gjlxrtap/public_html/mw19/includes/session/CookieSessionProvider.php(119): MediaWiki\Session\UserInfo::newFromId(string)
#14 /home/gjlxrtap/public_html/mw19/includes/session/SessionManager.php(487): MediaWiki\Session\CookieSessionProvider->provideSessionInfo(WebRequest)
#15 /home/gjlxrtap/public_html/mw19/includes/session/SessionManager.php(190): MediaWiki\Session\SessionManager->getSessionInfoForRequest(WebRequest)
#16 /home/gjlxrtap/public_html/mw19/includes/WebRequest.php(735): MediaWiki\Session\SessionManager->getSessionForRequest(WebRequest)
#17 /home/gjlxrtap/public_html/mw19/includes/session/SessionManager.php(129): WebRequest->getSession()
#18 /home/gjlxrtap/public_html/mw19/includes/Setup.php(762): MediaWiki\Session\SessionManager::getGlobalSession()
#19 /home/gjlxrtap/public_html/mw19/includes/WebStart.php(114): require_once(string)
#20 /home/gjlxrtap/public_html/mw19/index.php(40): require(string)
#21 {main}

Error: [MissingConnectionException] Database connection "Mysql" is missing, or could not be created + cakephp 2.x

I got an error during placing order. Order placed half and after that i got error. I checked error.log file i found,
013-11-25 16:35:07 Error: [MissingConnectionException] Database connection "Mysql" is missing, or could not be created.
#0 /usr/local/pem/vhosts/262731/webspace/httpdocs/parceldirect.ie/lib/Cake/Model/Datasource/DboSource.php(261): Mysql->connect()
#1 /usr/local/pem/vhosts/262731/webspace/httpdocs/parceldirect.ie/lib/Cake/Model/ConnectionManager.php(101): DboSource->__construct(Array)
#2 /usr/local/pem/vhosts/262731/webspace/httpdocs/parceldirect.ie/lib/Cake/Model/Model.php(3164): ConnectionManager::getDataSource('default')
#3 /usr/local/pem/vhosts/262731/webspace/httpdocs/parceldirect.ie/lib/Cake/Model/Model.php(1096): Model->setDataSource('default')
#4 /usr/local/pem/vhosts/262731/webspace/httpdocs/parceldirect.ie/lib/Cake/Model/Model.php(3186): Model->setSource('baskets')
#5 /usr/local/pem/vhosts/262731/webspace/httpdocs/parceldirect.ie/lib/Cake/Model/Model.php(2637): Model->getDataSource()
#6 /usr/local/pem/vhosts/262731/webspace/httpdocs/parceldirect.ie/app/Model/Basket.php(24): Model->find('first', Array)
#7 /usr/local/pem/vhosts/262731/webspace/httpdocs/parceldirect.ie/app/Controller/AppController.php(53): Basket->getSessionDetails('c71b56ada66fd45...')
#8 [internal function]: AppController->beforeFilter(Object(CakeEvent))
#9 /usr/local/pem/vhosts/262731/webspace/httpdocs/parceldirect.ie/lib/Cake/Event/CakeEventManager.php(246): call_user_func(Array, Object(CakeEvent))
#10 /usr/local/pem/vhosts/262731/webspace/httpdocs/parceldirect.ie/lib/Cake/Controller/Controller.php(669): CakeEventManager->dispatch(Object(CakeEvent))
#11 /usr/local/pem/vhosts/262731/webspace/httpdocs/parceldirect.ie/lib/Cake/Routing/Dispatcher.php(183): Controller->startupProcess()
#12 /usr/local/pem/vhosts/262731/webspace/httpdocs/parceldirect.ie/lib/Cake/Routing/Dispatcher.php(161): Dispatcher->_invoke(Object(IndexController), Object(CakeRequest), Object(CakeResponse))
#13 /usr/local/pem/vhosts/262731/webspace/httpdocs/parceldirect.ie/app/webroot/index.php(92): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#14 {main}
Can anyone suggest me what is the issue with connection? Was server down during order process and got that error? Or any other issue?

Fatal exception of type MWException

I recently installed MediaWiki in localhost on Debian 7 System. But after the installation, I got the exception Fatal exception of type MWException. I reviewed all reported bugs, but they do not apply to me.
PHP 5.4.4
phpmyaddmin....
As written in the comments, edit your LocalSettings.php file and add this line at the very end:
$wgShowExceptionDetails = true;
Try reloading the page that gives you that error. You're likely to see what's called a backtrace... here is my example:
#0 /Users/user/www/extensions/LocalisationUpdate/LocalisationUpdate.class.php(553): LocalisationUpdate::filename('it')
#1 /Users/user/www/extensions/LocalisationUpdate/LocalisationUpdate.class.php(36): LocalisationUpdate::readFile('it')
#2 [internal function]: LocalisationUpdate::onRecache(Object(LocalisationCache), 'it', Array)
#3 /Users/user/www/includes/Hooks.php(255): call_user_func_array('LocalisationUpd...', Array)
#4 /Users/user/www/includes/GlobalFunctions.php(3883): Hooks::run('LocalisationCac...', Array)
#5 /Users/user/www/includes/cache/LocalisationCache.php(796): wfRunHooks('LocalisationCac...', Array)
#6 /Users/user/www/includes/cache/LocalisationCache.php(426): LocalisationCache->recache('it')
#7 /Users/user/www/includes/cache/LocalisationCache.php(310): LocalisationCache->initLanguage('it')
#8 /Users/user/www/includes/cache/LocalisationCache.php(245): LocalisationCache->loadItem('it', 'fallback')
#9 /Users/user/www/languages/Language.php(3978): LocalisationCache->getItem('it', 'fallback')
#10 /Users/user/www/languages/Language.php(230): Language::getFallbacksFor('it')
#11 /Users/user/www/languages/Language.php(189): Language::newFromCode('it')
#12 /Users/user/www/includes/Setup.php(497): Language::factory('it')
#13 /Users/user/www/includes/WebStart.php(161): require_once('/Users/user/3d...')
#14 /Users/user/www/index.php(55): require('/Users/user/3d...')
#15 {main}
The first line is the one that stopped the execution, causing the exception. If you can identify the problem (in my case it's the LocalisationUpdate extension) it can be very easy to fix. Again, in my case it's enough to open again LocalSettings.php and comment out or delete the line:
require_once( "$IP/extensions/LocalisationUpdate/LocalisationUpdate.php" );
There could be a problem with caching, try to use
$wgMainCacheType = CACHE_NONE;