• Resolved shahidjaszle

    (@shahidjaszle)


    Hello BuddyBoss, thanks for the latest update. However the Delete function just doesn’t work on my site. When I click on the delete button, the popup did shown up, however the page just refreshed.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author BuddyBoss

    (@buddyboss)

    Hi @shahidjaszle
    Sorry for the trouble.
    Can you check the javascript console for errors?
    In Chrome go to “View -> Developer -> Javascript Console” and in Firefox you can go to “Tools -> Web Developer -> Console”

    Let me know what errors if any you are getting!

    I can’t delete project too, however I try to look at the developer console, but nothing is related to this plugin

    Plugin Author BuddyBoss

    (@buddyboss)

    @hasanfachrul,@shahidjaszle
    The fix has been committed to the BP Portfolio plugin. the next bugfix release will include this.

    Meanwhile, you should be able to work around the issue by adding following code in your theme’s functions.php

    
    /**
     * Handle project delete
     */
    function bpcp_process_delete_project() {
    
     if ( isset( $_POST['target_project'] ) &&  isset( $_POST['delete_yes'] ) && 'Delete' == $_POST['delete_yes'] ) {
    
     $target_project = $_POST['target_project'];
    
     $deleted_project = wp_delete_post($target_project);
    
     if ($deleted_project) {
    
                bp_core_add_message(__('Project deleted successfully', 'bp-portfolio'), 'success');
    
     // now redirect to the members > username > portfolio
     $base_link = bpcp_portfolio_component_root();
                bp_core_redirect($base_link);
            }
        }
    }
    
    add_action( 'bp_actions', 'bpcp_process_delete_project' );
    • This reply was modified 7 years, 3 months ago by BuddyBoss.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Project Cannot Be Deleted on Frontend’ is closed to new replies.