Fixed error after upgrade

maszd

Well-known member
Hi,
i successfully upgrade from 1.5.14 to 2.0 beta 1, when i try to open forum list this error appear :

An exception occurred: [TypeError] Argument 1 passed to XF\ApprovalQueue\AbstractHandler::canView() must be an instance of XF\Mvc\Entity\Entity, null given, called in /usr/share/nginx/html/src/XF/Repository/ApprovalQueue.php on line 73 in /usr/share/nginx/html/src/XF/ApprovalQueue/AbstractHandler.php on line 19
  1. XF\ApprovalQueue\AbstractHandler->canView() in /usr/share/nginx/html/src/XF/Repository/ApprovalQueue.php at line 73
  2. XF\Repository\ApprovalQueue->XF\Repository\{closure}()
  3. array_filter() in /usr/share/nginx/html/src/XF/Mvc/Entity/AbstractCollection.php at line 167
  4. XF\Mvc\Entity\AbstractCollection->filter() in /usr/share/nginx/html/src/XF/Repository/ApprovalQueue.php at line 74
  5. XF\Repository\ApprovalQueue->filterViewableUnapprovedItems() in /usr/share/nginx/html/src/XF/Pub/App.php at line 223
  6. XF\Pub\App->updateModeratorCaches() in /usr/share/nginx/html/src/XF/Pub/App.php at line 103
  7. XF\Pub\App->start() in /usr/share/nginx/html/src/XF/App.php at line 1767
  8. XF\App->run() in /usr/share/nginx/html/src/XF.php at line 319
  9. XF::runApp() in /usr/share/nginx/html/index.php at line 13
 
Last edited:
another error

Code:
League\Flysystem\FileExistsException: File already exists at path: file_check/temp-file-check-2.json in src/vendor/league/flysystem/src/Filesystem.php at line 401

    League\Flysystem\Filesystem->assertAbsent() in src/vendor/league/flysystem/src/Filesystem.php at line 65
    League\Flysystem\Filesystem->write()
    call_user_func_array() in src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php at line 431
    League\Flysystem\EventableFilesystem\EventableFilesystem->callFilesystemMethod() in src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php at line 395
    League\Flysystem\EventableFilesystem\EventableFilesystem->delegateMethodCall() in src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php at line 247
    League\Flysystem\EventableFilesystem\EventableFilesystem->write()
    call_user_func_array() in src/vendor/league/flysystem/src/MountManager.php at line 269
    League\Flysystem\MountManager->invokePluginOnFilesystem() in src/vendor/league/flysystem/src/MountManager.php at line 179
    League\Flysystem\MountManager->__call() in src/XF/Job/FileCheck.php at line 136
    XF\Job\FileCheck->run() in src/XF/Job/Manager.php at line 193
    XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 140
    XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 76
    XF\Job\Manager->runQueue() in src/XF/Admin/Controller/Tools.php at line 105
    XF\Admin\Controller\Tools->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 232
    XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 85
    XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
    XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1771
    XF\App->run() in src/XF.php at line 319
    XF::runApp() in admin.php at line 13
 
Hi,
i successfully upgrade from 1.5.14 to 2.0 beta 1, when i try to open forum list this error appear :

An exception occurred: [TypeError] Argument 1 passed to XF\ApprovalQueue\AbstractHandler::canView() must be an instance of XF\Mvc\Entity\Entity, null given, called in /usr/share/nginx/html/src/XF/Repository/ApprovalQueue.php on line 73 in /usr/share/nginx/html/src/XF/ApprovalQueue/AbstractHandler.php on line 19
  1. XF\ApprovalQueue\AbstractHandler->canView() in /usr/share/nginx/html/src/XF/Repository/ApprovalQueue.php at line 73
  2. XF\Repository\ApprovalQueue->XF\Repository\{closure}()
  3. array_filter() in /usr/share/nginx/html/src/XF/Mvc/Entity/AbstractCollection.php at line 167
  4. XF\Mvc\Entity\AbstractCollection->filter() in /usr/share/nginx/html/src/XF/Repository/ApprovalQueue.php at line 74
  5. XF\Repository\ApprovalQueue->filterViewableUnapprovedItems() in /usr/share/nginx/html/src/XF/Pub/App.php at line 223
  6. XF\Pub\App->updateModeratorCaches() in /usr/share/nginx/html/src/XF/Pub/App.php at line 103
  7. XF\Pub\App->start() in /usr/share/nginx/html/src/XF/App.php at line 1767
  8. XF\App->run() in /usr/share/nginx/html/src/XF.php at line 319
  9. XF::runApp() in /usr/share/nginx/html/index.php at line 13
We might be able to handle this but ultimately it appears as though there's an item in your approval / moderation queue that is orphaned and doesn't have the expected data available.

If you aren't aware of any items in the moderation queue before upgrade then it's possible that you can just empty that table. However, before you do, can you look in the table and tell us what's in there right now?

another error

Code:
League\Flysystem\FileExistsException: File already exists at path: file_check/temp-file-check-2.json in src/vendor/league/flysystem/src/Filesystem.php at line 401

    League\Flysystem\Filesystem->assertAbsent() in src/vendor/league/flysystem/src/Filesystem.php at line 65
    League\Flysystem\Filesystem->write()
    call_user_func_array() in src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php at line 431
    League\Flysystem\EventableFilesystem\EventableFilesystem->callFilesystemMethod() in src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php at line 395
    League\Flysystem\EventableFilesystem\EventableFilesystem->delegateMethodCall() in src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php at line 247
    League\Flysystem\EventableFilesystem\EventableFilesystem->write()
    call_user_func_array() in src/vendor/league/flysystem/src/MountManager.php at line 269
    League\Flysystem\MountManager->invokePluginOnFilesystem() in src/vendor/league/flysystem/src/MountManager.php at line 179
    League\Flysystem\MountManager->__call() in src/XF/Job/FileCheck.php at line 136
    XF\Job\FileCheck->run() in src/XF/Job/Manager.php at line 193
    XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 140
    XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 76
    XF\Job\Manager->runQueue() in src/XF/Admin/Controller/Tools.php at line 105
    XF\Admin\Controller\Tools->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 232
    XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 85
    XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
    XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1771
    XF\App->run() in src/XF.php at line 319
    XF::runApp() in admin.php at line 13
There's a resolved bug report about this.
 
its safe to empty this table with result two content id here?
i try to run this command TRUNCATE TABLE `xf_approval_queue` (was backup first) and now error is gone :D
thanks.
 
This is fixed now, thanks. I think it was also triggered by a 1.x bug that didn't clean up the approval queue record on profile post comments properly.
 
Back
Top Bottom