ssossossosso

Forums

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

Forums OroCRM OroCRM – Installation/Technical Issues or Problems No mapping found for field 'picture' on class '…Entity\Contact'

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

  • Creator
    Topic
  • #55855

    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
  • #55856
    Ivan Klymenko
    Ivan Klymenko
    Keymaster

    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.

    #55857

    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.

    #55858
    Ivan Klymenko
    Ivan Klymenko
    Keymaster

    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?

    #55859

    abober
    Participant

    My oro_migrations record for ContactBundle:

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

    #55860

    dimitri.seguin17
    Participant

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

    #55861
    Artem Liubeznyi
    Artem Liubeznyi
    Keymaster

    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.

ssossossosso