MediaWiki TemplateParser.php internal error - mediawiki

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?

Related

Error occur after composer require

I ran composer require 2amigos/yii2-multi-select-widget "*" and after my site went down
An Error occurred while handling another error:
yii\base\InvalidArgumentException: Invalid path alias: #dektrium/rbac/views in C:\xampp\htdocs\webster\vendor\yiisoft\yii2\BaseYii.php:154
Stack trace:
#0 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\base\Theme.php(144): yii\BaseYii::getAlias('#dektrium/rbac/...')
#1 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\base\View.php(228): yii\base\Theme->applyTo('C:\\xampp\\htdocs...')
#2 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\web\ErrorHandler.php(266): yii\base\View->renderFile('C:\\xampp\\htdocs...', Array, Object(yii\web\ErrorHandler))
#3 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\web\ErrorHandler.php(126): yii\web\ErrorHandler->renderFile('#yii/views/erro...', Array)
#4 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\base\ErrorHandler.php(111): yii\web\ErrorHandler->renderException(Object(yii\base\InvalidArgumentException))
#5 [internal function]: yii\base\ErrorHandler->handleException(Object(yii\base\InvalidArgumentException))
#6 {main}
Previous exception:
yii\base\InvalidArgumentException: Invalid path alias: #dektrium/rbac/views in C:\xampp\htdocs\webster\vendor\yiisoft\yii2\BaseYii.php:154
Stack trace:
#0 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\base\Theme.php(144): yii\BaseYii::getAlias('#dektrium/rbac/...')
#1 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\base\View.php(228): yii\base\Theme->applyTo('C:\\xampp\\htdocs...')
#2 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\base\View.php(156): yii\base\View->renderFile('C:\\xampp\\htdocs...', Array, Object(backend\controllers\SiteController))
#3 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\base\Controller.php(384): yii\base\View->render('index', Array, Object(backend\controllers\SiteController))
#4 C:\xampp\htdocs\webster\backend\controllers\SiteController.php(65): yii\base\Controller->render('index')
#5 [internal function]: backend\controllers\SiteController->actionIndex()
#6 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\base\InlineAction.php(57): call_user_func_array(Array, Array)
#7 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\base\Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#8 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\base\Module.php(528): yii\base\Controller->runAction('', Array)
#9 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\web\Application.php(103): yii\base\Module->runAction('', Array)
#10 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\base\Application.php(386): yii\web\Application->handleRequest(Object(yii\web\Request))
#11 C:\xampp\htdocs\webster\backend\web\index.php(18): yii\base\Application->run()
#12 {main}
It is all that I did. Nothing more nothing less. Just tried to install multi-select and my site went down. Why is that? What can cause this? I tried to remove it composer remove 2amigos/yii2-multi-select-widget and nothing happen. I am totally shocked. Please give me advice!

Yii2 migration configException error

Suddenly any of the migration command is not working in my project and i don't know why. following is the errors in cmd.
C:\wamp64\www\project>yii migrate
Exception 'yii\base\InvalidConfigException' with message 'Failed to instantiate component or class "user".'
in C:\wamp64\www\project\vendor\yiisoft\yii2\di\Instance.php:139
Stack trace:
#0 C:\wamp64\www\project\vendor\yiisoft\yii2\filters\AccessControl.php(100): yii\di\Instance::ensure(Object(yii\di\Instance), 'yii\\web\\User')
#1 C:\wamp64\www\project\vendor\yiisoft\yii2\base\Object.php(107): yii\filters\AccessControl->init()
#2 [internal function]: yii\base\Object->__construct(Array)
#3 C:\wamp64\www\project\vendor\yiisoft\yii2\di\Container.php(381): ReflectionClass->newInstanceArgs(Array)
#4 C:\wamp64\www\project\vendor\yiisoft\yii2\di\Container.php(156): yii\di\Container->build('yii\\filters\\Acc...', Array, Array)
#5 C:\wamp64\www\project\vendor\yiisoft\yii2\BaseYii.php(348): yii\di\Container->get('yii\\filters\\Acc...', Array, Array)
#6 C:\wamp64\www\project\vendor\yiisoft\yii2\base\Component.php(183): yii\BaseYii::createObject(Array)
#7 C:\wamp64\www\project\vendor\yiisoft\yii2\BaseYii.php(529): yii\base\Component->__set('beforeRequest', Array)
#8 C:\wamp64\www\project\vendor\yiisoft\yii2\base\Object.php(105): yii\BaseYii::configure(Object(yii\console\Application), Array)
#9 C:\wamp64\www\project\vendor\yiisoft\yii2\base\Application.php(205): yii\base\Object->__construct(Array)
#10 C:\wamp64\www\project\vendor\yiisoft\yii2\console\Application.php(89): yii\base\Application->__construct(Array)
#11 C:\wamp64\www\project\yii(26): yii\console\Application->__construct(Array)
#12 {main}
Please help me to solve it.

Warning: include(Google/Client.php): failed to open stream: No such file or directory

I've been working for the last couple days at trying to get to Google Shopping to work. I keep getting this error:
Warning: include(Google/Client.php): failed to open stream: No such file or directory in /home/xxxx/public_html/lib/Varien/Autoload.php on line 56
#0 /home/xxxx/public_html/lib/Varien/Autoload.php(56): mageCoreErrorHandler(2, 'include(Google/...', '/home/xxxx/...', 56, Array)
#1 /home/xxxx/public_html/lib/Varien/Autoload.php(56): Varien_Autoload::autoload()
#2 [internal function]: Varien_Autoload->autoload('Google_Client')
#3 [internal function]: spl_autoload_call('Google_Client')
#4 /home/xxxx/public_html/vendor/google/apiclient/src/Google/Auth/AssertionCredentials.php(18): class_exists('Google_Client')
#5 /home/xxxx/public_html/vendor/google/apiclient/src/Google/autoload.php(29): require_once('/home/xxxx/...')
#6 [internal function]: Varien_Autoload->{closure}('Google_Auth_Ass...')
#7 /home/xxxx/public_html/app/code/community/BlueVisionTec/GoogleShoppingApi/Model/GoogleShopping.php(107): spl_autoload_call('Google_Auth_Ass...')
#8 /home/xxxx/public_html/app/code/community/BlueVisionTec/GoogleShoppingApi/controllers/Adminhtml/GoogleShoppingApi/ItemsController.php(53): BlueVisionTec_GoogleShoppingApi_Model_GoogleShopping->getClient('1')
#9 /home/xxxx/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(278): BlueVisionTec_GoogleShoppingApi_Adminhtml_GoogleShoppingApi_ItemsController->indexAction()
#10 /home/xxxx/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(200): Mage_Core_Controller_Varien_Action->dispatch('index')
#11 /home/xxxx/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(116): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#12 /home/xxxx/public_html/app/code/core/Mage/Core/Model/App.php(189): Mage_Core_Controller_Varien_Front->dispatch()
#13 /home/xxxx/public_html/app/Mage.php(415): Mage_Core_Model_App->run(Array)
#14 /home/xxxx/public_html/index.php(40): Mage::run('', 'store')
#15 {main}
I've tried installing with composer and manually but nothing seems to work. Anyone knows what the problem is? Thanks
I moved the Google file to the root of my site, like Google/Client.php then in BlueVisionTec/GoogleShoppingApi/Model/GoogleShopping.php I changed the link to require_once Mage::getBaseDir().'/Google/autoload.php'; and everything worked prefect.

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;