Giter Club home page Giter Club logo

easyadminmongoodmbundle's People

Contributors

alterphp avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

easyadminmongoodmbundle's Issues

Make sure the "EasyAdminExtensionBundle" bundle is correctly registered

Unable to find file "@EasyAdminExtensionBundle/Controller/MongoOdmEasyAdminController.php" in 
@EasyAdminExtensionBundle/Controller/MongoOdmEasyAdminController.php (which is being imported from 
"/Applications/XAMPP/xamppfiles/htdocs/ebolution/014mx-ebolution-bot_ma-web-api/config/routes/easy_admin.yaml"). 
Make sure the "EasyAdminExtensionBundle" bundle is correctly registered and loaded in the application kernel class. If the bundle is registered, make sure the bundle path 
"@EasyAdminExtensionBundle/Controller/MongoOdmEasyAdminController.php" is not empty.

Tengo un problema al intentar usar el bundle

Can't use AdminController if no ORM Entities configured

Hi, i try to install this bundle on empty project and got some errors.
I have created and configured a few documents, but i haven't any ORM Entity in my project.
My packages config:

#packages/easy_admin.yaml
easy_admin:
    design:
        menu:
        - { label: History, route: easyadmin_mongo_odm, params: { document: History } }
        - { label: Video, route: easyadmin_mongo_odm, params: { document: Video } }
        - { label: Article, route: easyadmin_mongo_odm, params: { document: Article } }

#packages/easy_admin_mongo_odm.yaml
easy_admin_mongo_odm:
    documents:
        - App\Document\History
        - App\Document\Video
        - App\Document\Article

And default routing config for EasyAdmin:

#routes/easy_admin.yaml
easy_admin_bundle:
    resource: '@EasyAdminBundle/Controller/AdminController.php'
    prefix: /admin
    type: annotation

At this step i got first error from vendor/easycorp/easyadmin-bundle/src/Controller/AdminController.php line 96:
The backend is empty because you haven't configured any Doctrine entity to manage.

After that i try to change controller parameter in my routes:

#routes/easy_admin.yaml
easy_admin_bundle:
    resource: '@EasyAdminMongoOdmBundle/Controller/AdminController.php'
    prefix: /admin
    type: annotation

At this step i got next two errors:

  1. Undefined class constant 'TO_MANY' at vendor/alterphp/easyadmin-mongo-odm-bundle/src/Configuration/MetadataConfigPass.php line 87:
    Possible solution: replace & ClassMetadata::TO_MANY to && ClassMetadata::REFERENCE_MANY constant at that line (FQCN Doctrine\ODM\MongoDB\Mapping\ClassMetadata)?

  2. If manually fix the first error i got the second one:
    Attempted to call an undefined method named "redirectToBackendHomepage" of class "AlterPHP\EasyAdminMongoOdmBundle\Controller\AdminController".
    from vendor/alterphp/easyadmin-mongo-odm-bundle/src/Controller/AdminController.php line 38
    Possible solution: class AlterPHP\EasyAdminMongoOdmBundle\Controller\AdminController should extend EasyCorp\Bundle\EasyAdminBundle\Controller or that method must be implemented with some redirect?

Package versions:

doctrine/mongodb - 1.6.3
doctrine/mongodb-odm - 1.2.5
doctrine/mongodb-odm-bundle - 3.4.4
easycorp/easyadmin-bundle - v1.17.14   
alterphp/easyadmin-extension-bundle - v1.2.10
alterphp/easyadmin-mongo-odm-bundle - dev-master d89751a

Will be glad to any advice, thanks.

The backend is empty because you haven't configured any Doctrine entity to manage.

Hello, fellow French developper !

I just started a Symfony 4 app with MongoDB ODM configured on it (the doc for it is horrible by the way), and I wanted to put an EasyAdmin on top of it. Problem is, I saw the GitHub issue there and a bit below, your answer.

I gave it a shot, installed it successfully but then, Symfony gives me this error :
The backend is empty because you haven't configured any Doctrine entity to manage. Solution: edit your configuration file (e.g. "config/packages/easy_admin.yaml") and configure the backend under the "easy_admin" key.

I already modified the easy_admin.yaml file to put the config of easy_admin_mongo_odm, but no luck.

Here is my easy_admin.yaml file :

easy_admin_mongo_odm:
    documents:
         User:
               class: App\Entity\User

easy_admin:
       design:
           menu: 
                 - { label: User, route: easyadmin_mongo_odm, params: { document: User } }

(Don't mind the App\Entity, I have my mongo Documents under src/Entity and so I kept the naming, but it's an actual document)

I also have this in my composer.json :

"alterphp/easyadmin-extension-bundle": "^2.0@dev",
"alterphp/easyadmin-mongo-odm-bundle": "dev-master",
        "easycorp/easyadmin-bundle": "^2.0@dev",

Do you know what could be the problem ?

Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.