OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Programming Questions Import Export bundle buttons

This topic contains 6 replies, has 3 voices, and was last updated by  sakhrimedamine 8 years, 11 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #33683

    Alex Taylor
    Participant

    Hi there,

    I have created a new entity which needs to be able to be imported and exported. I have done this by copying the logic in oro’s account bundle (importexport.yml, etc etc).

    The problem is, when I upload a csv within the modal Nothing happens. After more investigation i found the error ‘Processor with type “import_validation” and alias “” is not exist’ however it is declared within importexport.yml.

    The button code is as follows:

    Any help would be appreciated

    Cheers

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #33684

    Sergey
    Participant

    Hi Alex!

    Please post your importexport.yml file content here

    #33685

    Alex Taylor
    Participant

    Hi mate,

    Here is the file as is. It currently exports and shows my import template fine, however throws an error on import.

    Thanks again,

    Alex

    #33686

    Sergey
    Participant

    First of all you should use own aliases

    Next, if you configure `importProcessor: ‘atf_vehicle.add_or_replace’,` import processor you should define proper import processor:

    Entity class and tag alias should in button and service configuration

    #33687

    Alex Taylor
    Participant

    Hi mate

    Sorry that was the wrong file,

    End of a long day….

    This is the actual file, the entity obviously is atf_vehicle

    Thanks again for your quick help,

    Alex

    #33688

    Sergey
    Participant

    Got it, thanks!

    entity_class does not accept parameter name, please pass entity class to button configuration from controller

    like here
    https://github.com/orocrm/crm/blob/master/src/OroCRM/Bundle/SalesBundle/Controller/B2bCustomerController.php#L35-35

    button configuration:

    #33689

    sakhrimedamine
    Participant

    Hi,
    I’m new developper with or_platform and i have an error just with doing an import process
    I want to test the import functionality
    I have created an entity named RcUser using doctrine

    in my import-export.yml i have this configuration that i didn’t understand so much

    the normalizer, i didn’t change anything just doing with the default configuration

    also for the strategy

    in my dev log there is this is error
    batch.ERROR: Encountered an error executing the step: An exception occurred while executing ‘INSERT INTO rc_user (username, firstname, lastname, email) VALUES (?, ?, ?, ?)’ with params [null, null, null, null]:

    in the log that i generate to see from where the problem is

    >> this is denormalizer resultRC\PlatformBundle\Entity\RcUser::__set_state(array(
    ‘id’ => NULL,
    ‘username’ => NULL,
    ‘firstname’ => NULL,
    ‘lastname’ => NULL,
    ’email’ => NULL,
    ))
    >>this is process ObjectRC\PlatformBundle\Entity\RcUser::__set_state(array(
    ‘id’ => NULL,
    ‘username’ => NULL,
    ‘firstname’ => NULL,
    ‘lastname’ => NULL,
    ’email’ => NULL,
    )

    i have also add some log in the parent class of ConfigurableEntityNormalizer

    i have this log

    >> this is denormalizer parent class class’RC\\PlatformBundle\\Entity\\RcUser’
    >> this is denormalizer parent fieldhelper objectclass’Oro\\Bundle\\ImportExportBundle\\Field\\FieldHelper’
    >> this is denormalizer parent class fieldsarray (
    )

    please help,
    Thanks

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

The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.

Back to top