cross-solution / YAWIK

YAWIK is a web application. It can be used as an ATS applicant tracking system or as a jobboard.
https://yawik.org
MIT License
125 stars 67 forks source link

Upload of profile images or attachments does not work #129

Closed cbleek closed 9 years ago

cbleek commented 9 years ago

When uploading files the following exeption occourse. Maybe because of our upgrade to mongo 2.6?

2015-07-21 20:51:24 EXCEPTION The "DoctrineMongoODMModule\Proxy\__CG__\Applications\Entity\Attachment" document with identifier "55ae94a44e197fed357b23de" could not be found. in /data/www/clients/client1/web1/YAWIK/vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/DocumentNotFoundException.php on line 332015-07-21 20:55:23 EXCEPTION The "DoctrineMongoODMModule\Proxy\__CG__\Applications\Entity\Attachment" document with identifier "55ae94a44e197fed357b23de" could not be found. in /data/www/clients/client1/web1/YAWIK/vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/DocumentNotFoundException.php on line 33
[Trace]
        File: /data/www/clients/client1/web1/YAWIK/vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/Proxy/ProxyFactory.php
        Line: 176
    Function: documentNotFound
       Class: Doctrine\ODM\MongoDB\DocumentNotFoundException
        Type: static
------------------------------
        File: /data/www/clients/client1/web1/YAWIK/cache/DoctrineMongoODMModule/Proxy/__CG__ApplicationsEntityAttachment.php
        Line: 399
    Function: Doctrine\ODM\MongoDB\Proxy\{closure}
       Class: Doctrine\ODM\MongoDB\Proxy\ProxyFactory
        Type: method
------------------------------
        File: /data/www/clients/client1/web1/YAWIK/cache/DoctrineMongoODMModule/Proxy/__CG__ApplicationsEntityAttachment.php
        Line: 399
    Function: __invoke
       Class: Closure
        Type: method
------------------------------
        File: /data/www/clients/client1/web1/YAWIK/module/Applications/src/Applications/Repository/Event/UpdateFilesPermissionsSubscriber.php
        Line: 69
    Function: getPermissions
       Class: DoctrineMongoODMModule\Proxy\__CG__\Applications\Entity\Attachment
        Type: method
------------------------------
        File: /data/www/clients/client1/web1/YAWIK/vendor/doctrine/common/lib/Doctrine/Common/EventManager.php
        Line: 59
    Function: onFlush
       Class: Applications\Repository\Event\UpdateFilesPermissionsSubscriber
        Type: method
------------------------------
        File: /data/www/clients/client1/web1/YAWIK/vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/UnitOfWork.php
        Line: 427
    Function: dispatchEvent
       Class: Doctrine\Common\EventManager
        Type: method
------------------------------
        File: /data/www/clients/client1/web1/YAWIK/vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/DocumentManager.php
        Line: 526
    Function: commit
       Class: Doctrine\ODM\MongoDB\UnitOfWork
        Type: method
------------------------------
        File: /data/www/clients/client1/web1/YAWIK/module/Core/src/Core/Repository/RepositoryService.php
        Line: 57
    Function: flush
       Class: Doctrine\ODM\MongoDB\DocumentManager
        Type: method
------------------------------
        File: /data/www/clients/client1/web1/YAWIK/module/Core/src/Core/Repository/DoctrineMongoODM/PersistenceListener.php
        Line: 72
    Function: flush
       Class: Core\Repository\RepositoryService
        Type: method
------------------------------
    Function: flushDocumentManager
       Class: Core\Repository\DoctrineMongoODM\PersistenceListener
        Type: method
------------------------------
        File: /data/www/clients/client1/web1/YAWIK/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php
        Line: 468
    Function: call_user_func
------------------------------
        File: /data/www/clients/client1/web1/YAWIK/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php
        Line: 207
    Function: triggerListeners
       Class: Zend\EventManager\EventManager
        Type: method
------------------------------
        File: /data/www/clients/client1/web1/YAWIK/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php
        Line: 309
    Function: trigger
       Class: Zend\EventManager\EventManager
        Type: method
------------------------------
        File: /data/www/clients/client1/web1/YAWIK/public/index.php
        Line: 32
    Function: run
       Class: Zend\Mvc\Application
        Type: method
------------------------------
cbleek commented 9 years ago

On master branch with mongo 2.6 the upload is working.

But I had to remove the index "login_1" after switching to master

set1:PRIMARY> db.users.dropIndex("login_1");
{ "nIndexesWas" : 2, "ok" : 1 }
mathias-weitz-cross-solutions commented 9 years ago

reverted the commits that caused this problem.