Fixed XFMG 2.0 RC1

gouwepeer.nl

Well-known member
Affected version
2.0 rc1
After upgrading:

Code:
InvalidArgumentException: Unknown moderator handler type 'xfmg_media' in src/XF/ModeratorLog/Logger.php at line 183
XF\ModeratorLog\Logger->handler() in src/XF/ModeratorLog/Logger.php at line 20
XF\ModeratorLog\Logger->logChanges() in src/XF/Logger.php at line 47
XF\Logger->logModeratorChanges() in src/addons/XFMG/Entity/MediaItem.php at line 1005
XFMG\Entity\MediaItem->_postSave() in src/XF/Mvc/Entity/Entity.php at line 1109
XF\Mvc\Entity\Entity->save() in src/addons/XFMG/Setup.php at line 2226
XFMG\Setup->upgrade902000038Step3() in src/XF/AddOn/StepRunnerUpgradeTrait.php at line 117
XFMG\Setup->upgradeStepRunner() in src/XF/AddOn/StepRunnerUpgradeTrait.php at line 74
XFMG\Setup->upgrade() in src/XF/Admin/Controller/AddOn.php at line 433
XF\Admin\Controller\AddOn->actionUpgrade() in src/XF/Mvc/Dispatcher.php at line 249
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 88
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1852
XF\App->run() in src/XF.php at line 328
XF::runApp() in admin.php at line 13
 
This is fixed for the next release. To fix it now and get through the upgrade (if it was indeed prevented) then open the file src/addons/XFMG/Setup.php and find:
PHP:
$album = $this->app->em()->find('XFMG:Album', $albumId);
And below that add:
PHP:
$album->setOption('log_moderator', false);
Then find:
PHP:
$mediaItem = $this->app->em()->find('XFMG:MediaItem', $mediaId);
And below that add:
PHP:
$mediaItem->setOption('log_moderator', false);
 
Back
Top Bottom