• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 2.0 Error in Permission/Builder when installing/uninstalling add-on

mjda

Active member
#1
I originally thought this might be caused by a bug, but I didn't see it reported and I can't imagine this one going unnoticed so now I'm thinking it might be something I did wrong.

I just followed the steps to building the add-on from the 2.0 docs and when I uninstall or install the add-on I get the following error:

ErrorException: Undefined index: in src/XF/Permission/Builder.php at line 382
  1. XF::handlePhpError() in src/XF/Permission/Builder.php at line 382
  2. XF\Permission\Builder->pickPermissionPriorityValue() in src/XF/Permission/Builder.php at line 350
  3. XF\Permission\Builder->calculatePermissions() in src/XF/Permission/TreeContentPermissions.php at line 111
  4. XF\Permission\TreeContentPermissions->buildForContent() in src/XF/Permission/TreeContentPermissions.php at line 102
  5. XF\Permission\TreeContentPermissions->buildForChildrenOf() in src/XF/Permission/TreeContentPermissions.php at line 118
  6. XF\Permission\TreeContentPermissions->buildForContent() in src/XF/Permission/TreeContentPermissions.php at line 102
  7. XF\Permission\TreeContentPermissions->buildForChildrenOf() in src/XF/Permission/TreeContentPermissions.php at line 40
  8. XF\Permission\TreeContentPermissions->rebuildCombination() in src/XF/Permission/Builder.php at line 148
  9. XF\Permission\Builder->rebuildCombinationContent() in src/XF/Permission/Builder.php at line 140
  10. XF\Permission\Builder->rebuildCombination() in src/XF/Job/PermissionRebuild.php at line 58
  11. XF\Job\PermissionRebuild->run() in src/XF/Job/Manager.php at line 193
  12. XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 140
  13. XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 76
  14. XF\Job\Manager->runQueue() in src/XF/Admin/Controller/Tools.php at line 105
  15. XF\Admin\Controller\Tools->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 232
  16. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 85
  17. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
  18. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1771
  19. XF\App->run() in src/XF.php at line 319
  20. XF::runApp() in admin.php at line 13
Any ideas?
 

mjda

Active member
#4
Actually, now I have another problem. The add-on installs just fine. However, when I go to uninstall it, I get the following error:

LogicException: Add-on is not installed in src/XF/AddOn/AddOn.php at line 581
  1. XF\AddOn\AddOn->postDataImport() in src/XF/Job/AddOnData.php at line 80
  2. XF\Job\AddOnData->run() in src/XF/Job/Manager.php at line 193
  3. XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 140
  4. XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 76
  5. XF\Job\Manager->runQueue() in src/XF/Admin/Controller/Tools.php at line 105
  6. XF\Admin\Controller\Tools->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 232
  7. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 85
  8. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
  9. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1771
  10. XF\App->run() in src/XF.php at line 319
  11. XF::runApp() in admin.php at line 13
It does appear that the add-on was successfully uninstalled, though.
 

mjda

Active member
#5
I figured it out. Evidently you can't make changes to an add-on, after installing it, then try to uninstall it. Ha! Completely removed it, installed it again, and now it uninstalls just fine.