Announcement

Collapse
No announcement yet.

Import List Not Working and No Errors Created

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Import List Not Working and No Errors Created

    When I try to upload a list, I am able to map fields, and then upload.
    The process reports that it is complete but 0 records are created and no errors appear.

    How can I diagnose the error?

  • #2
    Hello
    Check espocrm logs, please

    Comment


    • #3
      There are no errors in the logs, I see entries but all have 200 success codes, no errors at all.

      Comment


      • #4
        I tried to import only company field and nothing else and it didn't work.

        Here's what I've tested:
        - Contacts
        - Leads
        - Accounts

        - Create Only
        - Create & Update

        - Mapping All Fields
        - Mapping Only 1 Field

        Nothing is working. The file is read and I can see the test rows on the first page of the import with no issues.

        Is there a sample download file that might have different encoding I should copy the data into?
        I am starting with an XLS file and then saving as CSV.

        Thanks for your help.

        M

        Comment


        • #5
          Could you attach the file (you can crypt important field)? Also, is it possible you have duplicates in ids?
          Last edited by tanya; 07-28-2017, 07:33 AM.

          Comment


          • #6
            Here is a file with a sample of 5 rows.

            Comment


            • tanya
              tanya commented
              Editing a comment
              Not found. Is it full link?

          • #7
            The link was truncated. Try this pasted as text.



            By enabling Cron checkbox I was able to get 3 columns to import, but when I map all the fields it doesn't work.

            Are there fields where if I map First Name / Last Name I cannot map Account Name for example?
            Perhaps this is a conflict with something like that?


            Comment


            • #8
              In your csv file line breaks with "\r" symbol, needs to be "\n"

              Comment


              • #9
                I was able to import some fields, but now all.

                Are there fields where if I map First Name / Last Name I cannot map Account Name for example?
                Perhaps this is a conflict with something like that?

                Comment


                • #10
                  Still think the problem is with csv file (for ex. line breaking).
                  Try to replace
                  Code:
                  $contents = str_replace("\r\n", "\n", $contents);
                  with
                  Code:
                   $contents = str_replace(["\r\n", "\r"], "\n", $contents);
                  at 363 (+-) line application/Espo/Services/Import.php

                  Comment


                  • #11
                    I opened the csv file in text editor and I don't see the \n.
                    How can I run these commands on the file?

                    Thank you for your help on solving this!

                    Comment


                    • #12
                      line breaking symbols:

                      \n is used for Unix systems (including Linux, and OSX).

                      \r\n is mainly used on Windows.

                      \r is used on really old Macs.

                      In text redactor you can see only new line. With Find option you can check, if any symbol is included.

                      Did you modify the file Import.php?

                      Comment


                      • #13
                        We never touched the import.php file.
                        How can we test and see how to fix it?

                        Comment


                        • #14
                          Click image for larger version  Name:	Screen Shot 2017-08-11 at 5.07.43 PM.png Views:	1 Size:	112.8 KB ID:	29845

                          I just edited the import.php file and got the same results.
                          One of the imports worked for a few fields but would not work for all fields.

                          What do you recommend?
                          Last edited by mmandell; 08-11-2017, 09:08 PM.

                          Comment


                          • #15
                            Validate your csv file
                            check the log
                            separate data to recognize the problem reason

                            Comment

                            Working...
                            X