Home Forums Plugin Support WP User Frontend Pro Redirection loop when deleting posts.

This topic is: not resolved

This topic contains 7 replies, has 2 voices, and was last updated by  hatchmedia 3 years, 9 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #68302

    hatchmedia
    Participant
    Post count: 116

    Hey guys,

    When a user deletes a post from their dashboard, the site gets caught in a Redirection Loop.

    The following is appended to the URL and it repeats this in the Network tab of Web Dev Tools until the redirection loop error occurs.

    ?action=del&pid=12301&_wpnonce=7d079c5504&msg=deleted

    Any ideas?

    Damien

    #68313

    towhid
    Participant
    Post count: 4505

    Hello Damien,

    I have tried to reproduce this issue but failed. It could be a has a chance of theme or plugin conflicts. You can disable all your plugins except User Frontend and switch to a default theme of WordPress like- Twenty Twelve, Twenty Thirteen, Twenty Fourteen and let me know the results.

    Thanks

    #68340

    hatchmedia
    Participant
    Post count: 116

    Hi Towhid,

    Thanks for the response.

    Removing all the plugins did not resolve the issue but swapping the theme did. It also seemed to resolve another open issue I have open here.

    So, obviously the issue must be somewhere in my theme's code, but could you give me any clues as to where it might be? The only thing I have done with the dashboard area is add code that allows for multiple post types and also, a redirect after upload:

    /*
    ==========================================================
    Multiple Post Types for the Dashboard
    ==========================================================
    */
    function wpufe_dashboard_post_type( $args ) {
        $args['post_type'] = array( 'dogs', 'cats', 'others', 'post' );
     
        return $args;
    }
     
    add_filter( 'wpuf_dashboard_query', 'wpufe_dashboard_post_type' );
    
    <?php
    /*
    =========================================================================
    WP User Frontend Redirect after upload
    =========================================================================
    */
    
    function wpuf_redirect_to_profile( $response ) {
    $response['redirect_to'] = bp_core_get_user_domain( get_current_user_id() );
    
    return $response;
    }
    
    add_filter( 'wpuf_add_post_redirect', 'wpuf_redirect_to_profile' );
    add_filter( 'wpuf_edit_post_redirect', 'wpuf_redirect_to_profile' );
    ?>
    
    

    Damien

    #68400

    hatchmedia
    Participant
    Post count: 116

    Just to give an update to this.

    I have my dashboard set up to go to the users BuddyPress profile. So it works as http://mysite.ie/USERNAME/my-posts. If I remove the USERNAME element, then the posts will delete without an issue.

    When I delete from USERNAME/my-posts, the following is added to the URL:
    ?action=del&pid=12301&_wpnonce=7d079c5504&msg=deleted

    When I delete form just /my-posts, then this is added to the URL:
    /?msg=deleted

    Is there anything that you can think of that would cause this to stop working? It had worked on a previous version of WPUF before.

    Cheers

    Damien

    #68804

    towhid
    Participant
    Post count: 4505

    Hello Damien,

    Literally speaking, do not do anythings unusual. Just create a page then insert a shortcode [wpuf_dashboard]. Now access the page from the website's frontend. You will get all the post you have created. If you want to delete any post just click delete.

    You will get a URL on the browser address field like it is – http://yoursite.com/dashboard

    Thanks

    #68812

    hatchmedia
    Participant
    Post count: 116

    Thanks Twohid,

    As mentioned though in my last email, that does work, but I have it set up to go to a user account which includes their username.

    This has worked before without any issues. It has worked for probably about a year now, but since the updating, it seems to have stopped.

    Please see this post from 2 years ago where I set this up with Tareq.

    Is there anything that you can think of for where I should be looking?

    Damien

    #68858

    towhid
    Participant
    Post count: 4505

    Hello Damien,

    Please allow me some time. I will check this matter. Hope I will come back to you with a right solution.

    Thanks

    #68859

    hatchmedia
    Participant
    Post count: 116

    Thanks Towhid, appreciate the help.

    Damien

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Redirection loop when deleting posts.’ is closed to new replies.