•  
      request #13251 Document manager plugin might crash when a project is deleted
    Infos
    #13251
    Thomas Gerbet (tgerbet)
    2019-04-11 10:17
    2019-04-09 16:56
    14123
    Details
    Document manager plugin might crash when a project is deleted
    If you try to mark a project as deleted, the docman plugin can crash.

    Trace:
    Fatal error: Uncaught Error: Call to undefined method Docman_Empty::addItem() in /usr/share/tuleap/plugins/docman/include/Docman_ItemFactory.class.php on line 506
    Error: Call to undefined method Docman_Empty::addItem() in /usr/share/tuleap/plugins/docman/include/Docman_ItemFactory.class.php on line 506
    Call Stack
    # Time Memory Function Location
    1 0.0000 401928 {main}( ) .../groupedit.php:0
    2 0.0354 4176160 Tuleap\admin\ProjectEdit\ProjectEditRouter->route( ) .../groupedit.php:80
    3 0.0354 4176160 Tuleap\admin\ProjectEdit\ProjectEditController->updateProject( ) .../ProjectEditRouter.php:40
    4 0.0370 4176960 Tuleap\admin\ProjectEdit\ProjectEditController->propagateStatusChange( ) .../ProjectEditController.php:113
    5 0.0392 4118280 EventManager->processEvent( ) .../ProjectEditController.php:151
    6 0.0418 4164440 EventManager->processEventOnListener( ) .../EventManager.class.php:101
    7 0.0418 4164440 Tuleap\Plugin\PluginLoader->Tuleap\Plugin\{closure}( ) .../EventManager.class.php:113
    8 0.0418 4164440 EventManager->dispatch( ) .../PluginLoader.php:63
    9 0.0418 4164440 DocmanPlugin->project_is_deleted( ) .../EventManager.class.php:124
    10 0.0472 4546560 Docman_ItemFactory->deleteProjectTree( ) .../docmanPlugin.class.php:917
    11 0.0491 4571040 Docman_PermissionsManager->currentUserCanWriteSubItems( ) .../Docman_ItemFactory.class.php:1352
    12 0.0491 4571040 Docman_PermissionsManager->userCanWriteSubItems( ) .../Docman_PermissionsManager.class.php:361
    13 0.0491 4571040 Docman_PermissionsManager->_getItemTreeForPermChecking( ) .../Docman_PermissionsManager.class.php:372
    14 0.0496 4601512 Docman_ItemFactory->getItemSubTree( ) .../Docman_PermissionsManager.class.php:388
    Doc/Documentation manager
    All
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Empty
    Declined
    2019-04-11
    Attachments
    Empty
    References
    Referenced by request #13251

    Follow-ups

    User avatar
    Thomas Gerbet (tgerbet)2019-04-11 10:17
    It seems the issue can only be reproduced when everything is already broken everywhere. Let's close this one for now.

    Fixing it properly would require a massive rewrite. Ultimately it should be done but it is far outside of the scope of a simple bugfix.

    • Status changed from Under review to Declined
    • Close date set to 2019-04-11
    User avatar
    Thomas Gerbet (tgerbet)2019-04-09 17:34
    Crash only happens when the docman plugin has never been initialized in the project being deleted.

    A patch is under review: gerrit #14669.

    • Summary
      -Document manager plugin crashes when a project is deleted 
      +Document manager plugin might crash when a project is deleted 
    • Status changed from Under implementation to Under review