ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

Forums OroCRM OroCRM – Programming Questions CRUD Tutorial – Could not load type "inventory_vehicle"

This topic contains 10 replies, has 2 voices, and was last updated by  Christian Kleinhuis 11 months ago.

  • Creator
    Topic
  • #54210

    Christian Kleinhuis
    Participant

    hi there, totally new to oro and symfony, after making the first tutorial on extending the navigation menu i went on trying out the “simple crud tutorial” i am now at the point where the /inventory/vehicle route shows an empty list, but when clicking on the “create new” button “Could not load type “inventory_vehicle”” occurs

    is there a cli command that need to be executed to scan for DependencyInjection?
    -> because when inserting an error in the extension.php class or throwing an exception does not do anything, so i suspect the DependencyInjection is not scanned via cache:clear but through some other mysterious cli action?

    totally nice framework you put up there, some hints for non symfony cracks would be helpful e.g. how to include $loader in the dependency injection

    any hint is very welcome, thank you in advance

Viewing 10 replies - 1 through 10 (of 10 total)
  • Author
    Replies
  • #54211

    Christian Kleinhuis
    Participant

    kk, found a more detailed tutorial with a github orocrm crud, thought would help people struggling as well:

    OroCRM – Creating a simple CRUD (part 1)

    #54212

    Christian Kleinhuis
    Participant

    sadly the refered github repository does not work as well, how to install a bundle other than cache:clear ?
    i tried out this repository referenced in the article above
    https://github.com/ldusan84/DusanSimpleBundle

    strange error when having the test active, when deleting the test folder it runs through cache:clear but no crud entity is visible :(

    #54213

    Christian Kleinhuis
    Participant

    continued …. :D

    the DependencyInjection files have to follow the naming scheme

    http://symfony.com/doc/current/bundles/extension.html

    then the dependency injection is picked up, i changed name and namespace of the demo bundle so it had to be compliant for being picked up

    following that the type definition has to match the symfony interface
    so in the type definition i had to replace

    with

    so that the OptionsResolver class is known

    so, having that running i get the following error which i need to examine now to check out why doctrine does not find the table definition, perhapos running a doctrine: command on console, or include the migration steps . as demonstrated in above github project …

    #54214

    Christian Kleinhuis
    Participant

    having the migration skript in place, executing

    php app/console oro:migration:load –dry-run –force

    does not list the migration for the bundle which is living in the ./src folder

    #54215

    Christian Kleinhuis
    Participant

    documenting, i have created the needed mysql table by hand, and creation of entities works, but sadly the listview shows an empty list, although they are present in the db

    #54216

    Christian Kleinhuis
    Participant

    listview was fixed through removing the delete action since it was not correctly picked up,

    right now the oro:migration:load command does not pick up our migration schema :( is there a naming schema or something needed to be picked up?!?!?

    #54217

    Christian Kleinhuis
    Participant

    okay, and here we are, it is working, the crud is running for newcomers,

    initialising the table is done via “doctrine:schema:update”

    #54218

    Christian Kleinhuis
    Participant

    tl;dr

    – watch for naming, dependency scanning follows naming rule
    – initialise database with migration scripts (doctrine:schema:update works for initialisation as well but IS NOT SUGGESTED)
    – might have to update class reference and use Symfony\Component\OptionsResolver\OptionsResolver instead of OptionsResolverInterface depending on versions used

    #54219
    Mike Kudelya
    Mike Kudelya
    Moderator

    Hi

    Thank you for your interest in our system and the suggestions! You can have a look at our documentation which provides a lot of useful information.


    #54220

    Christian Kleinhuis
    Participant

    thank you for the link, here is some more useful information:

    – after copying the bundle into /src execute
    php/console oro:migration:load
    to exectute database updates
    – use /app_dev.php to browser to orocrm installation

Viewing 10 replies - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.

ssossossosso