Menu

#347 File form Drop folder is not inserted into form.

5.1.2
closed
drop folder (1)
bug
2017-09-23
2017-09-16
No

Hi Uwe,

when clicking the fitles available in the drop folder to create a new document, the page for new document is opened but the field for the file remains empty, although url seems to be ok: ......./dms/out/out.AddDocument.php?folderid=1&dropfolderfileform1=testfile.png
In your DEMO-installation it works fine. So, what's wrong?

Discussion

  • Uwe Steinmann

    Uwe Steinmann - 2017-09-18

    It's also working in my local copy. If you have some basic php knowledge, you could check if the filename is passed to the view in views/bootstrap/class.AddDocument.php. Search for $dropfolderfile and echo it. You may as well check in out/out.AddDocument.php if the filename is passed to the view.

     
  • Marek Lerawski

    Marek Lerawski - 2017-09-18

    Hi Uwe,

    Thank you for pointing at least to the right file to search for.

    in $this->printDropFolderChooserHtml("form1", $dropfolderfile); the value for $dropfolderfile is not set. I am not expert enough to find out at which point you are reading $GET[....] or to precise: whehere is the point where $this->params['dropfolderfile']; is set from the url?
    Replacing the line in the form by

    printDropFolderChooserHtml("form1",$GET['dropfolderfileform1']);?>

    did it for me, but I am not happy with this on the long run.

     
  • Uwe Steinmann

    Uwe Steinmann - 2017-09-20

    That helps. If $_GET['dropfolderfileform1'] is set, then it should be basically working. Go into out/out.AddDocument.php and place a print_r($_REQUEST) right before the line $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); You will see a couple of lines further down, that $_REQUEST['dropfolderfileform1'] is passed as a parameter to the view. Within the view views/bootstrap/class.AddDocument.php this parameter is read again, saved into $dropfolderfile and finally passed to $this->printDropFolderChooserHtml(). Looks like this fails somewhere on the way.

    $_REQUEST should contain your filename in the element dropfolderfileform1.

    Just to make sure we are talking about the same process. Are you using the list of drop folder files in the menu?

     
  • Marek Lerawski

    Marek Lerawski - 2017-09-22

    Hi Uwe,

    SOLVED!
    after seeing that adding print_r to out.AddDocument.php has no visible output , I found out that somehow it is using some of the files from old version. I don't know if there is some cache for php files or whatever in the webserver.... I was very suprised!
    However,

    1. I added echo "HelloWorld!"; the old out.AddDocument.php and voila it was visible.
    2. I searched the settings.xml for some reference to 5.0.11 but nothing ..... 
    3. I renamed old folder seeddms-5.0.11 to xxxseeddms-5.0.11 and blank screen.
    4. Refreshed page with F5 and "HelloWorld" was gone and everything works fine now.
    

    So basically I changed noting but renamed the folder with the old version. Thanks to your comments I was able to find out what's wrong. I think you can close the ticket.

     
  • Uwe Steinmann

    Uwe Steinmann - 2017-09-23
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB