Support » Plugin: BuddyDrive » Cannot remove files inside folders on UI

  • Hi

    Deleting files on dashboard/BuddyDrive works well.

    When tried to delete files on UI, at first everything seemed to go well.
    After browser refresh files appear back again.
    No errors in console.

    Please help!

Viewing 6 replies - 1 through 6 (of 6 total)
  • same issue for me. deleting from backend did the trick though.

    • This reply was modified 5 years, 10 months ago by sbz2.
    Thread Starter kariravantti

    (@kariravantti)

    We have fixed this issue by ourselves.
    2 files needed to be modified with just few lines of code.
    buddydrive-item-classes.php
    buddydrive-item-functions.php

    (BuddyDrive does not actually delete files when deleting on UI)

    Hi @kariravantti can you share you solution with me?
    Please Help. =)

    Plugin Author mrpritchett

    (@mrpritchett)

    @kariravantti I’d love to see your fix as well. If it solves the issue permanently I can include it in the list of feature additions and bug fixes going into the next version.

    Thread Starter kariravantti

    (@kariravantti)

    Sure. @luuigi and @mrpritchett

    Should I share the files somewhere? (I’m new here)

    Changes in code:

    buddydrive-item-classes.php
    Line 783 add
    // Set action identifier
    $args[‘user_action’] = ‘remove_from_group’;

    …before existing
    $updated = buddydrive_update_item( $args, $item );

    buddydrive-item-functions.php
    Line 703 replace
    if ( ! empty( $item->post_parent ) && empty( $params[‘parent_folder_id’] ) ) {
    $default_privacy = ‘private’;

    if ( ! empty( $args[‘privacy’] ) && buddydrive_get_privacy( ‘buddydrive_’ . $args[‘privacy’] ) ) {
    $default_privacy = $args[‘privacy’];
    }

    $params[‘privacy’] = $default_privacy;
    } elseif ( ! empty( $params[‘parent_folder_id’] ) && $params[‘type’] === buddydrive_get_file_post_type() ) {
    // Set default privacy if user is deleting from group
    if( !empty( $params[‘user_action’] ) && $params[‘user_action’] === ‘remove_from_group’){
    $params[‘privacy’] = $default_privacy;
    } else {
    $params[‘privacy’] = buddydrive_get_privacy( $params[‘parent_folder_id’] );
    }
    }

    Those should look better in editor.

    @mrpritchett
    Note that we have tested the fix only in one (multi)site.
    Please mention the company I represent with the bug fix. “AuroraDS”

    We have done some other mods too:

    File extensions visible on UI (works with office files too)
    Sorting of files in alphabetical order
    Finnish translations (not fully finished yet)

    Would you be interested in any of those?

    Plugin Author mrpritchett

    (@mrpritchett)

    I’ll try to take a look at the above code in place this week. We always welcome more translations. In regards to the other items, I’m currently working on a new site for the plugin that will allow for core plugin improvement ideas as well as premium and free add-ons. That sounds like it might be something for that.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Cannot remove files inside folders on UI’ is closed to new replies.