0

I tried to reinstall the vendors files by using the command line code:

bin/vendors install --reinstall

It successfully got installed. But when i tried to access my site i get this fatal error:

Fatal error: Class Sonata\DoctrineORMAdminBundle\Model\ModelManager contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (Sonata\AdminBundle\Model\ModelManagerInterface::getDataSourceIterator, Sonata\AdminBundle\Model\ModelManagerInterface::getExportFields) in C:\xampp\htdocs\myProject\vendor\bundles\Sonata\DoctrineORMAdminBundle\Model\ModelManager.php on line 496

It seems that Sonata\AdminBundle\Model\ModelManagerInterface has two functions: getDataSourceIterator and getExportFields which the Sonata\DoctrineORMAdminBundle\Model\ModelManager class to implement it.

I have no idea what needs to be done here. Could anyone help me please?

Thanks!

VishwaKumar
  • 3,433
  • 8
  • 44
  • 72

1 Answers1

0

This happens when you're trying to run Sonata's Admin Bundle 2.0 with an outdated Sonata's Doctrine2 ORM Admin Bundle. All you have to do is to update your Doctrine2 ORM Admin Bundle and everything should runs fine.

Here is how to do it: http://sonata-project.org/bundles/doctrine-orm-admin/2-0/doc/reference/installation.html

Thomas
  • 222
  • 2
  • 14