Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1235269
    movieboy
    Participant

    I am having two issues with BBpress in X:

    1) The link for a single post does not work properly. If you go to a topic that has more than one page of posts, and select a post from a page other than the first page (by copying the link for the post number), that link will only take you to the first post on the first page of the topic.

    2) The pagination links next to the topics is not showing in the list of topics so there is no way to go directly to page 2 of a topic.

    #1235619
    Rad
    Moderator

    Hi there,

    Thanks for posting in.

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thanks!

    #1242979
    movieboy
    Participant
    This reply has been marked as private.
    #1242982
    movieboy
    Participant

    I think I fixed the second issue, but the issue is with X.

    Because of the way that X is theming BBPress, the following edit needed to be made:

    In the bbpress plugin folder, edit bbpress/includes/topics/template.php line 855 to read as follows:

    'total' => ceil( (filter_var($total, FILTER_SANITIZE_STRING) + 1 ) / bbp_get_replies_per_page() ),

    Original line reads as:

    'total' => ceil( (int) $total / (int) bbp_get_replies_per_page() ),

    #1243302
    Rue Nel
    Moderator

    Hello There,

    This changed wasn’t made by X. The bbPress plugin has changed it. We at Themeco only integrates bbPress in X using styles so that it would look decent with X theme. We do not modify any plugin or output of the plugin such as the change you’ve made.

    Hope this explains it briefly.

    #1243346
    movieboy
    Participant

    X theme is wrapping the element such that value returned is no longer a number, this is causing the pagination to return a result. the code I added forces the plugin to strip the value returned to be a number again and the pagination works again.

    My guess is that the same thing is causing the individual posts to not return the correct page.

    #1243550
    Rad
    Moderator

    Hi there,

    If that’s the case, the other users may get the same issue. But I haven’t read or heard similar issues yet since the integration of bbPress templates to X theme.

    Based on that code, the filter is required for $total to fix it. The $total is bbPress internal or local variable inaccessible to other plugins or theme. If you’ll check /x/bbpress/pagination-replies.php, /x/bbpress/pagination-search.php, /x/bbpress/pagination-topics.php. You’ll see that X theme only calls the pagination functions that bbPress’ provided. No variable and data modification.

    There are some issues related to pagination like portfolio and blog posts pagination, but they are due to permalinks, URL rewrite, and query_var are not properly passed.

    Glad it’s working now and thanks for sharing.

    Thanks!

    #1247800
    movieboy
    Participant

    On a clean install of wordpress, bbpress and x, I get the exact same results. So, it cannot be working for anyone, as far as I can tell.

    In the bbpress code I see this:

    $total = bbp_get_topic_reply_count( $r['topic_id'], true );

    and in the xtheme I see this: (x/framework/functions/global/plugins/bbpress.php)

    add_filter( 'bbp_get_forum_reply_count', 'x_bbpress_filter_forum_reply_count' );

    and

    if ( ! function_exists( 'x_bbpress_filter_forum_reply_count' ) ) :
      function x_bbpress_filter_forum_reply_count( $replies ) {
    
        return '<span class="x-bbp-count">' . $replies . '</span>';
      }
    endif;

    Which, if it am reading this correctly is wrapping the code in a span class, and also returns a non-numeric result.

    My second issue is still unresolved. The link to a single post that is not on page 1 does not work.

    #1248402
    Christian
    Moderator

    Hey there,

    Upon checking, the link works properly. This link (https://thirdgategames.com/forums/topic/spring-disneyland-resort-game-april-10/page/2/) for example, takes me to the exact page 2 and not page 1 (see attachment).

    If I’m not understanding you correctly, would you mind providing a screen recording on how you are getting the issue?

    Thanks.

    #1249296
    movieboy
    Participant

    Yes, that link works properly, but a links to a specific post does not, for example:

    MouseAdventure Villains Post-Game Discussion [Spoilers]

    takes you to page 1 of the thread, not to page 5 where the post is.

    #1249298
    movieboy
    Participant

    (that link comes from clicking on the link number at the top right of the post)

    #1249744
    Christian
    Moderator

    I see now. The link should be https://thirdgategames.com/forums/topic/mouseadventure-villains-post-game-discussion-spoilers/page/5/#post-880. Clicking on the link does not change the fragment identifier or the #post- part of the URL that is why you don’t get a link. If you need to link to a post your need to visit the page number first like https://thirdgategames.com/forums/topic/mouseadventure-villains-post-game-discussion-spoilers/page/5/ then attach the ID of the post (i.e. #post-880). There’s currently no solution to this as a script in X affects links with #.

    I’ll forward this to our development team.

    Thanks.

  • <script> jQuery(function($){ $("#no-reply-1235269 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>