• Resolved LeGuerg

    (@isa_admin)


    Hi everyone,

    I’m using FileAway v3.9.6.1 since several monthes without any problems, but recently I face an issue with the Delete/Rename file or folder functions.

    My shortcode is this one:
    [fileaway type="table" base="2" manager="on" makedir="true" paginate="false" metadata="database" redirect="true" flightbox="images" directories="on" icons="filetype" ]
    (Manager Mode is set for Admins, Authors and Editors)

    So the problem is Delete/Rename file or folder functions ar not working anymore. For instance, when I click on “Delete”, the page is now refreshing.
    I can still create folders or upload files with no issue, but once files or folders are created/uploaded, there is no way to remove or rename them.

    Did someone already face this ? Do you have any clues ?
    Thanx a lot for your help 🙂

    Greg

    • This topic was modified 9 years, 8 months ago by LeGuerg.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author thomstark

    (@thomstark)

    You say the page refreshes? Check your console for javascript errors

    • This reply was modified 9 years, 8 months ago by thomstark.
    Thread Starter LeGuerg

    (@isa_admin)

    Hi,

    Also, I first suspected a javascript error, but no warnings were triggered on page loading, nor on link click.
    So, I checked PHP files. I looked at:
    ./plugins/file-away/lib/cls/class.fileaway.php
    ./plugins/file-away/lib/inc/inc.directories.php

    It seems that this HTML code in the first file (line 266)

    "<a href='' id='rename-ssfa-file-$uid-$count'>".__('Rename', 'file-away')."</a><br>".
    "<a href='' id='delete-ssfa-file-$uid-$count'>".__('Delete', 'file-away')."</a>";

    and this one in the second file (line 119),

    ? "<a href='' id='rename-ssfa-dir-$uid-$f'>".__('Rename', 'file-away')."</a><br>".
    "<a href='' id='delete-ssfa-dir-$uid-$f'>".__('Delete', 'file-away')."</a></td>" 

    were leading to refreshes the page on Rename/Remove action. It seems that the empty href=” code is the cause of the refresh action (on Chrome 53, at least)

    So, I replaced the above codes with href=’javascript:’:

    "<a href='javascript:' id='rename-ssfa-file-$uid-$count'>".__('Rename', 'file-away')."</a><br>".
    "<a href='javascript:' id='delete-ssfa-file-$uid-$count'>".__('Delete', 'file-away')."</a>";
    ? "<a href='javascript:' id='rename-ssfa-dir-$uid-$f'>".__('Rename', 'file-away')."</a><br>".
    "<a href='javascript:' id='delete-ssfa-dir-$uid-$f'>".__('Delete', 'file-away')."</a></td>" 

    And now, all is working fine again ! 😉

    Thx, hope this may help someone

    • This reply was modified 9 years, 8 months ago by LeGuerg.
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Issue with Delete/Rename file or folder’ is closed to new replies.