ssossossosso

Forums

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

This topic contains 6 replies, has 4 voices, and was last updated by Artem Liubeznyi Artem Liubeznyi 1 year, 3 months ago.

  • Creator
    Topic
  • #16605

    abober
    Participant

    After migration from 1.9.0-RC1 to 1.9.0 I have an error.

    When I try view contacts, I see error message:

    An exception has been thrown during the rendering of a template (“No mapping found for field ‘picture’ on class ‘OroCRM\Bundle\ContactBundle\Entity\Contact’.”) in vendor/oro/platform/src/Oro/Bundle/UIBundle/Resources/views/actions/index.html.twig at line 44.

    I removed all files from app/cache directory, and did oro:migration:load –force command

    I was looking for and I don’t have any mapping class for table oro_attachment_file.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #16622
    Ivan Klymenko
    Ivan Klymenko
    Oro Core

    Hi abober,
    how did you upgrade your OroCRM project to the latest release?

    Did you run next command after composer install:

    Because executing oro:migration:load command is not a valid way to upgrade.

    #16640

    abober
    Participant

    Hi, thx for answer, I can’t remember, but I think that I started from this command and something went wrong, so I was trying to debug step by step.

    I think it doesn’t matter, because when you look here:
    https://github.com/orocrm/crm/blob/master/src/OroCRM/Bundle/ContactBundle/Entity/Contact.php

    indeed there is no mapping for picture field.

    I’ve found Oro\Bundle\AttachmentBundle\Entity\File which maps oro_attachment_file table, and I’ve added reference in Contact class.

    Now all works fine.

    #16663
    Ivan Klymenko
    Ivan Klymenko
    Oro Core

    Hi Anna,
    picture field is extended field, so it should not be present in the mapping of the original entity class. It should be added by migration and then automatically mapped in the EX_OroCRMContactBundle_Contact.php.

    If you will add property for the extended field directly to the original entity class, it could lead to an issues if this extended field will be deleted manually from the UI or from a migration.

    From my opinion the appropriate migration was not executed, or appropriate proxy class was not generated properly. Could you please check the oro_migration table and tell what version is set for OroCRMContactBundle?

    #16664

    abober
    Participant

    My oro_migrations record for ContactBundle:

    id | bundle | version | loaded_at
    —-+—————————–+———+———————
    37 | OroCRMContactBundle | v1_13 | 2015-11-03 15:51:37

    #20041

    dimitri.seguin17
    Participant

    Hello, I have the same problem, this was resolved ?

    #20051
    Artem Liubeznyi
    Artem Liubeznyi
    Oro Core

    Hi Dimitri,

    As I can see from the discussion, Anna had this sorted out. Please see Ivan’s response above.

    Thank you.

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

You must be logged in to reply to this topic.