Problems with importing data - failed message or Error 500 - but nothing in log file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wondertrout
    Junior Member
    • Apr 2022
    • 17

    Problems with importing data - failed message or Error 500 - but nothing in log file

    I am having a couple of problems importing data that I've slowly been working through. Some relate to the data itself (like quote characters in text fields causing problems with CSV structure) but others I can't quite explain.

    The ID field length in espocrm is too short for the importing of data exported from anotehr CRM system. This means that ID's are being truncated and I therefore have to rely on text/name field content to update and populate with related records (i.e., I have to use name lookups rather than ID look ups when running the import)

    If I skip the related fields from the import (typically contact records that refer to other contact records) I can get the data to import. I thought it might have been that it can't create a relationship by name when the 'master' contact record may not yet have been created (which would make perfect sense). However, when I run an import and skip the related contact name field (to create the initial contact records) then rerun the import to update the related contact records in a second pass, the import immediately fails with an Error 500. There's no additional information available in the log files anywhere that helps me track down the problem though. It would be nice to have the import progress being logged somewhere.

    I suspect the problem might be resolved simply by lengthening the ID field length and using the original ID's from my exported data - but I'm concerned that this might cause other problems if I just start changing the default field definitions.

    Any ideas...?
  • Vadym
    Super Moderator
    • Jun 2021
    • 345

    #2
    Hi wondertrout

    Try to investigate this error in your browser DevTools (F12).

    Comment

    • wondertrout
      Junior Member
      • Apr 2022
      • 17

      #3
      [SOLVED] Seems there's a couple of issues here. One was fixed by using a dummy ID as the update key, rather than the date createdAt field.Seems it doesn't like using a datetime field as the key. The other problem was solved by ensuring that related fields were not blank values. That is, if a record was being imported with a related contact, it would fail if the contact field being imported was blank. Filling any blank fields in teh import file solved this problem as well. Then I could do a bulk update of the field content to return to null values. The interesting thing is that it did not appear to be consistent. Some entities would allowing importing of blank related fields while others did not. I haven't been able to work out if this is just related to custom entities or not.
      Last edited by wondertrout; 05-29-2022, 05:14 AM.

      Comment

      • hbinfo
        Junior Member
        • Jun 2022
        • 1

        #4
        When i try to import CONTACTs it fails with "Error 418" which vanishes after few seconds.
        I am trying to import just 3 records to test first.
        Can anyone help please?

        Comment

        • Vadym
          Super Moderator
          • Jun 2021
          • 345

          #5
          Originally posted by hbinfo
          When i try to import CONTACTs it fails with "Error 418" which vanishes after few seconds.
          I am trying to import just 3 records to test first.
          Can anyone help please?
          Hi hbinfo

          Please provide an EspoCRM error log file https://docs.espocrm.com/administrat...ng/#check-logs and screenshot of `Administration -> System Requirements` to investigate your issue in more detail.

          Comment

          Working...