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
124 stars 67 forks source link

Error in Create a job #471

Closed navneetccna closed 6 years ago

navneetccna commented 6 years ago

YAWIK: v0.30.2 MongoDB server version: 3.6.2

As I read mongo docs https://docs.mongodb.com/v3.2/reference/operator/update/pushAll/ $pushAll : Deprecated since version 2.4: Use the $push operator with $each instead.

Please change code accordingly

When i tired to save Title and job location and Companyname getting following error. Other part of the form is working file

An error occurred

An error occurred during execution; please try again later.


Additional information:

MongoWriteConcernException

File:
/var/www/html/YAWIK/vendor/doctrine/mongodb/lib/Doctrine/MongoDB/Collection.php:1442
Message:
localhost:27017: Unknown modifier: $pushAll
Stack trace:
#0 /var/www/html/YAWIK/vendor/doctrine/mongodb/lib/Doctrine/MongoDB/Collection.php(1442): MongoCollection->update(Array, Array, Array)
#1 /var/www/html/YAWIK/vendor/doctrine/mongodb/lib/Doctrine/MongoDB/Collection.php(860): Doctrine\MongoDB\Collection->doUpdate(Array, Array, Array)
#2 /var/www/html/YAWIK/vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/Persisters/CollectionPersister.php(274): Doctrine\MongoDB\Collection->update(Array, Array, Array)
#3 /var/www/html/YAWIK/vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/Persisters/CollectionPersister.php(219): Doctrine\ODM\MongoDB\Persisters\CollectionPersister->executeQuery(Object(Jobs\Entity\Job), Array, Array)
#4 /var/www/html/YAWIK/vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/Persisters/CollectionPersister.php(120): Doctrine\ODM\MongoDB\Persisters\CollectionPersister->insertElements(Object(Doctrine\ODM\MongoDB\PersistentCollection), Array)
#5 /var/www/html/YAWIK/vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/Persisters/DocumentPersister.php(1331): Doctrine\ODM\MongoDB\Persisters\CollectionPersister->update(Object(Doctrine\ODM\MongoDB\PersistentCollection), Array)
#6 /var/www/html/YAWIK/vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/Persisters/DocumentPersister.php(430): Doctrine\ODM\MongoDB\Persisters\DocumentPersister->handleCollections(Object(Jobs\Entity\Job), Array)
#7 /var/www/html/YAWIK/vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/UnitOfWork.php(1174): Doctrine\ODM\MongoDB\Persisters\DocumentPersister->update(Object(Jobs\Entity\Job), Array)
#8 /var/www/html/YAWIK/vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/UnitOfWork.php(433): Doctrine\ODM\MongoDB\UnitOfWork->executeUpdates(Object(Doctrine\ODM\MongoDB\Mapping\ClassMetadata), Array, Array)
#9 /var/www/html/YAWIK/vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/DocumentManager.php(526): Doctrine\ODM\MongoDB\UnitOfWork->commit(Object(Jobs\Entity\Job), Array)
#10 /var/www/html/YAWIK/module/Core/src/Core/Repository/RepositoryService.php(53): Doctrine\ODM\MongoDB\DocumentManager->flush(Object(Jobs\Entity\Job))
#11 /var/www/html/YAWIK/module/Jobs/src/Jobs/Controller/ManageController.php(315): Core\Repository\RepositoryService->store(Object(Jobs\Entity\Job))
#12 /var/www/html/YAWIK/module/Jobs/src/Jobs/Controller/ManageController.php(184): Jobs\Controller\ManageController->save()
#13 /var/www/html/YAWIK/vendor/zendframework/zend-mvc/src/Controller/AbstractActionController.php(78): Jobs\Controller\ManageController->editAction()
#14 /var/www/html/YAWIK/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#15 /var/www/html/YAWIK/vendor/zendframework/zend-eventmanager/src/EventManager.php(179): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent), Object(Closure))
#16 /var/www/html/YAWIK/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php(105): Zend\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent))
#17 /var/www/html/YAWIK/vendor/zendframework/zend-mvc/src/DispatchListener.php(119): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#18 /var/www/html/YAWIK/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#19 /var/www/html/YAWIK/vendor/zendframework/zend-eventmanager/src/EventManager.php(179): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent), Object(Closure))
#20 /var/www/html/YAWIK/vendor/zendframework/zend-mvc/src/Application.php(332): Zend\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent))
#21 /var/www/html/YAWIK/public/index.php(50): Zend\Mvc\Application->run()
#22 {main}
cbleek commented 6 years ago

our 0.30.2 uses

            "name": "doctrine/mongodb-odm",
            "version": "1.1.3",

pushAll was removed in Mongo 3.6. And the issue was fixed in.

https://github.com/doctrine/mongodb-odm/blob/1.2.x/CHANGELOG-1.2.md#121-2017-12-08

So we should upgrade dependencies and create a new release.

Thanks for reporting

cbleek commented 6 years ago

Mongo 3.6 works in our latest release

https://github.com/cross-solution/YAWIK/releases/tag/v0.31