Skip to:
Content
Pages
Categories
Search
Top
Bottom

Both Undelete and Delete links are under each post


  • Ben L.
    Member

    @nightgunner5

    On my forum (http://forums.llamaslayers.net/) both (un)delete links show up under each post, whether it is deleted or not. I’ve tried my theme and all my plugins separately on a local install of bbPress, but the problem does not occur. I’m on bbPress trunk if that helps. (I update it automatically via FTP from my home computer)

Viewing 10 replies - 1 through 10 (of 10 total)

  • chrishajer
    Participant

    @chrishajer

    Rather than trying your theme and plugins on another installation, how about turning off the plugins and trying the default theme on your live forums? Testing the other way is not a 100% test.

    Do you know what revision of trunk you’re using? I installed trunk two years ago, but it was a much different version then.


    Ben L.
    Member

    @nightgunner5

    I’m on the current trunk as of writing this post. (1903) I’ll try testing the live forum.

    Edit: Using the default theme made the problem go away, but the line of code that shows the edit/delete/undelete links is exactly the same as Kakumei’s and there’s no functions.php file.


    chrishajer
    Participant

    @chrishajer

    So what could it be if using the default theme works properly, but your theme does not?


    _ck_
    Participant

    @_ck_

    Are the links for delete/undelete actually valid? What post do they link to?

    Sounds like the function doesn’t actually see the current post in your template.


    Ben L.
    Member

    @nightgunner5

    Both links are valid and link to the correct post’s delete/undelete function.


    _ck_
    Participant

    @_ck_

    Might be a trunk bug but strange how it works in the default.

    They changed how the links work to bb_post_admin so it’s all internal now.

    If there is a bug, it would be in

    function bb_get_post_delete_link( $post_id = 0 ) {

    Unless maybe in your template you have both

    bb_get_post_delete_link() and bb_post_admin()

    which should not be.

    Wait, I take that all back

    something crazy is going on with line 1599,

    you now MUST have in your theme both classes to hide the inactive link.

    So they essentially broke every theme in existance with the new trunk. Nice.

    $r = "<a href='$delete_uri' class='$ajax_delete_class delete-post'>" . __( 'Delete' ) . "</a> <a href='$undelete_uri' class='$ajax_undelete_class undelete-post'>" . __( 'Undelete' ). '</a>';

    Go into your stylesheet and copy from the default kakumei stylesheet the styles for

    #thread li .undelete-post, #thread li.deleted .delete-post { display: none; }
    #thread li.deleted .undelete-post { display: inline; }

    Are they calling everything threads instead of topics now? Ugh. More confusion.


    Ben L.
    Member

    @nightgunner5


    _ck_
    Participant

    @_ck_

    No you miss the point that both are put into the template so the ajax can hide or unhide the link as necessary depending on the post status.

    But older themes without the two classes above will never hide the alternate link by default. So they both show.

    There will be hundreds of questions about this now.

    Put these two classes into your style.css

    #thread li .undelete-post, #thread li.deleted .delete-post { display: none; }
    #thread li.deleted .undelete-post { display: inline; }

    and it should fix.

    I opened that a half a month ago :) But thanks, _ck_! It works now. I updated my ticket but … why isn’t it picking that up from the default template?

    Thanks for pointing out a solution to this.

    Actually, besides showing the Undelete button ever since I installed Alpha3, all my previously deleted posts on the forum reappeared.

    Now my forum is pretty young and not so busy so I just redeleted them but I guess it’s worth mentioning and checking for.

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.
Skip to toolbar