Skip to:
Content
Pages
Categories
Search
Top
Bottom

pagination count and links don't work.


  • shpitzyl
    Participant

    @shpitzyl

    Hi,
    After updating to 2.1.1 (I skipped 2.1) bp_activity_pagination_count() and bp_activity_pagination_links() don’t work anymore. It just shows “Viewing 1 – 0 of 0 items” without the links.

    Any idea why it is happening?

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

  • danbp
    Participant

    @danbp

    No idea, but have you tested with 2014 or 2013 theme ?


    shpitzyl
    Participant

    @shpitzyl

    I’m not sure what people here are referring to when talking about the 2014 theme.

    I’m using hueman theme. I tried to test it with the themes that come with wordpress by default and the issue remained. Also tested it with the theme that comes with buddypress (this is 2013 theme right?).

    I wonder if anyone else has that issue.


    danbp
    Participant

    @danbp

    @shpitzyl,

    buddypress comes without theme. BP Default is the old theming method used before 1.7/1.9 and bp-legacy is the template system needed by BP to show his stuff. This part is more or less used (depending the project) to work together with almost any theme.

    2013 or 2014 are the themes coming by default with WordPress (it’s easier to write 2014 than Twenty Fourteen)…. These themes are known to work with BuddyPress, and that’s why you constantly see on this forum some advice to activate one of them for debugging.

    Hueman is a free responsive wordpress theme, with several internal settings which are, for the most of them, deactivated out of the box. If you never worked with such sort of theme, it can be a little complicated to get it to work right with BuddyPress.

    If you use a child-theme, read attentively the theme and BP documentation about child theming, you probably missed something. I use it on a test site and have no counting issues.

    If the issue still remain, you have to follow the usual debug cycle: deactivate all your plugins except BP and track the culprit.

    And if you use some custom code in functions.php or /plugins/bp-custom.php, remove them, so you can test your install without any external influence. Pure WP+BP code only while debugging ! 😉


    shpitzyl
    Participant

    @shpitzyl

    There is nothing wrong with my child-theme configuration. I’ve tested it on 2014 theme, without bp-custom.php, the code in functions.php and BP template files are not applying because it is in my child theme and I’m testing on 2014 theme. Also turned off all plugins and installed fresh version of buddypress without any core hacks.

    The issue still persists. Everything was fine before upgrading to 2.1.1.

    I was thinking about opening a bug report ticket but if you say that everything is working for you then the issue must be on my end. I just can’t figure it out (yet).


    r-a-y
    Keymaster

    @r-a-y

    In BP 2.1, we have removed pagination counts for the activity component due to performance reasons by default:
    Changes to bp_has_activities() queries in BP 2.1

    If you want to add it back, change your custom activity-loop.php template from:

    <?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) ) ) : ?>

    to:

    <?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) . '&count_total=count_query' ) ) : ?>

    Note: I haven’t tested this, but let me know if this works or not.


    shpitzyl
    Participant

    @shpitzyl

    @r-a-y
    Passing ‘&count_total=count_query’ as argument to bp_has_activities() doesn’t seem to work.

    The reason I need it to work is because I’m using the plugin “Buddypress Site Wide Activity”.
    I tried to pass the argument inside the plugin (it uses bp_has_activities() to show the activities). Also, for testing purpose, I tried to do it inside activity-loop.php, Passed the argument and added bp_activity_pagination_count() and bp_activity_pagination_links() just to test it.

    It doesn’t work.

    The performance bottleneck that this query was causing made me re-think about it. Maybe it would be good enough for me to just add a link inside the plugin’s widget to the site wide activity page.

    Anyway, thanks for clarifying what the issue was.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘pagination count and links don't work.’ is closed to new replies.
Skip to toolbar