Menu

#90 Unable to import

v2.0
closed
nobody
autoclosed (14)
1
2018-11-13
2013-06-14
No

When trying to import I only get spinning loading pop-up. Let me know what additional info I can provide (screenshot attached).

1 Attachments

Discussion

  • Miha Petkovsek

    Miha Petkovsek - 2013-06-14

    Hi, you should check apache logs for additional details. I assume you are using development version?

     
  • Mariusz J. Handke

    You bet, 307 now, I will run through that and will let you know

     
  • Anonymous

    Anonymous - 2013-06-14

    Yep, same here in development.

     
  • Mariusz J. Handke

    Nothing obvious in apache's logs, no errors at all, strange export works, tested in chrome, ff, ie

    that's all I get

    [14/Jun/2013:15:13:13 +0100] "POST /site/admin/CSVimport.php HTTP/1.1" 200 1729 "https://ipam/subnets/1/331/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.94 Safari/537.36" 1299 2224
    
    [14/Jun/2013:15:13:13 +0100] "GET /js/jquery.fileUploader.js?_=1371219172747 HTTP/1.1" 200 4990 "https://ipam/subnets/1/331/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.94 Safari/537.36" 810 5323
    
     
  • Miha Petkovsek

    Miha Petkovsek - 2013-06-17

    I think this is related to javascript file not loading in time. If you click upload icon once and again after a sec it should load?

     
  • Anonymous

    Anonymous - 2013-06-17

    You are right. Second click to import button gets import window but i can't upload file because "failed Cannot move file to upload dir!" error. I changed mod of "csvupload" folder to 777 but it doesn't help.

     
  • Mariusz J. Handke

    Yep, double click works though the issue with file is still there, you can see below var_dump($_FILES) as well

    array(0) { }
    failed
    Cannot move file to upload dir!
    

    What I have noticed is that the form is missing method="POST" as below:

    <form name="csvimport" id="csvimport" enctype="multipart/form-data" action="site/admin/CSVimportVerify.php" method="POST">
    

    It does upload after method being added though does not import data. All I get is

    Success
    
     

    Last edit: Mariusz J. Handke 2013-06-18
  • Miha Petkovsek

    Miha Petkovsek - 2013-06-18

    ah...
    https://github.com/blueimp/jQuery-File-Upload/pull/2031

    Closed: Incompatible with JQuery 1.9

    Will try to find some other fix.

     
  • Mariusz J. Handke

    Super, looking forward

     
  • Miha Petkovsek

    Miha Petkovsek - 2013-06-18

    Would you mind testing it?

     
  • Mariusz J. Handke

    No probs just got home, give me few minutes

     
  • Mariusz J. Handke

    OK so if the file import.csv/import.xls does not exist in csvupload I'm getting error on the form

    phpipam_subnet_import.csv (0.43 KB)
    Error: Cannot move file to upload dir
    

    which then renders below on empty page

    {"status":"error","error":"Empty file"}
    

    When I create empty file it ends up with below

    phpipam_subnet_import.csv (0.43 KB)
    Upload successfull
    

    but then render the same empty page as above. But at that point I can click on SHOW which will list content of uploaded file and will give option to import.

    One thing needs review - to import you HAVE TO click on SHOW otherwise neither scroll bar nor option to import (3.) will show up.

     

    Last edit: Mariusz J. Handke 2013-06-18
  • Miha Petkovsek

    Miha Petkovsek - 2013-06-18

    If upload does not work check permissions on admin/upload folder.

    What do you mean by "which then renders below on empty page" > how can I reproduce this?

    Yes, you have to upload, click show file to verify and then import.

     
  • Mariusz J. Handke

    Go ahead and close that one. You were right. When I was checking out with svn user:group was changing into svn:svn and I must have forgotten about that at some point.


    Anyway about that error I was pointing out - you have it defined in CSVimportVerify.php at the end

    /* default - error */                                 
    echo '{"status":"error","error":"Empty file"}';       
    exit;
    

    It triggers when some error happen by means of below proposition being false

    isset($_FILES['file']) && $_FILES['file']['error'] == 0
    

    According to:

    var_dump(isset($_FILES['file']), $_FILES['file']['error'] == 0, $_FILES['file']['error']);
    

    I can see

    bool(true) bool(false) int(4)
    

    meaning

     UPLOAD_ERR_NO_FILE
    
        Value: 4; No file was uploaded.
    

    To repro:

    1. start import with valid file
    2. close window
    3. delete import.(csv|xls)
    4. attempt import (file does not need to be valid)
     

    Last edit: Mariusz J. Handke 2013-06-20
  • Anonymous

    Anonymous - 2015-12-07

    hello, was this issue solved? :)

     
  • Miha Petkovsek

    Miha Petkovsek - 2016-02-02
    • Labels: --> autoclosed
    • Status: open --> closed
     
  • Anonymous

    Anonymous - 2018-11-13
    Post awaiting moderation.

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB