OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

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

This topic contains 13 replies, has 4 voices, and was last updated by  kiatsiong.ng 9 months, 2 weeks ago.

  • Creator
    Topic
  • #25360

    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 13 replies - 1 through 13 (of 13 total)
  • Author
    Replies
  • #25361

    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)

    #25362

    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 :(

    #25363

    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 …

    #25364

    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

    #25365

    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

    #25366

    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?!?!?

    #25367

    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”

    #25368

    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

    #25369
    Mike Kudelya
    Mike Kudelya
    Participant

    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.

    #25370

    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

    #25371

    nominerdene
    Participant

    In my case it is fixed when change following code.

    replace

    with

    please make sure

    added in beginning of the file

    #38229

    kiatsiong.ng
    Participant

    Also

    #38240

    kiatsiong.ng
    Participant

    My current version of Oro Platform is 3.1.3, and following this guide, I also could not figure out how to delete the vehicle entity. I needed to remove the delete button in order to render the pages. Here’s my note. I would appreciate it very much if anyone can point me to the right direction on deleting entities on the latest version.

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

You must be logged in to reply to this topic.

You will be redirected to [title]. Would you like to continue?

Yes No