OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Programming Questions oro_platform import problem

This topic contains 4 replies, has 3 voices, and was last updated by  Sergey 4 years, 10 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
  • #33844
    sakhrimedamine
    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

    when i want to import the cvs file, i have this error

    Choose Processor:
    [0] oro_tracking.processor.data
    [1] orocrm_rc_user.add_or_replace
    > 1
    Choose Validation Processor:
    [0] orocrm_rc_user.add_or_replace
    > 0
    +—————+——-+
    | Results | Count |
    +—————+——-+
    | errors | 0 |
    | process | 4 |
    | read | 3 |
    | add | 4 |
    | replace | 0 |
    | update | 0 |
    | delete | 0 |
    | error_entries | 0 |
    +—————+——-+
    Do you want to proceed [yes]?
    Errors occurred during file import.

    this is my cvs file

    Id,”username”,”firstname”,”lastname”,”email”
    1,”Life Plan Counselling”,”dennis.wright_22e27″,”Jerry”,”Coleman”
    2,”Life Plansdfsdfsdf Counselling”,”dennsdgsdgsdis.wright_22e27″,”Jersdgsdry”,”Colsdgsdgeman”
    3,”Life Plan Counsellingssdgsdg”,”dennis.sdgsdg”,”Jerrsdgdsgy”,”Colesdgsdgman”

    please i need help,
    Thanks,

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #33845
    Jaimy
    Jaimy
    Participant

    Hi @sakhrimedamine,

    From what I can tell your email (in your csv file) isn’t a valid email address which could be a problem. Does your logs tell you anything more than “Errors occurred during import”? (see app/logs<prod.log> or <dev.log>). Since there is not much information go on for debugging.

    Kind Regards,

    Jaimy Casteleijn

    #33846
    sakhrimedamine
    sakhrimedamine
    Participant

    thanks @Jaimy,

    in my log there is this is error

    in my database the username, firstname, lastname, email must not be null,
    Theres is not other annotations that i must insert in my Entity class?

    Thanks,

    #33847
    Jaimy
    Jaimy
    Participant

    Hi @sakhrimedamine,

    From the looks of it your Entity class has the proper annotations, assuming you have the use Doctrine\ORM\Mapping as ORM; in your class of course. It seems to me that the data isn’t available to insert at all, since all your parameters are empty.

    I think you could add some debug lines in your Strategy class to see whether the data has been processed at all, or you could add some debug lines in your Normalizer class to see what kind of data you’re trying to normalize. For example, just use a file_put_contents(), with a print_r($array,true) so you can log your data into some kind of log file :)

    Kind Regards,

    Jaimy Casteleijn

    #33848

    Sergey
    Participant

    Hi, @sakhrimedamine

    In addition please check your validation.yml file. it should contain NotBlank constraints for not nullable properties.

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

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

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

Yes No