• Resolved acids76

    (@acids76)


    I have maybe a strange behaviour: the link (“Next Page »” on homepage of my app page, http://apps.facebook.com/acidstales/) to see older posts doesn’t work for me. If i click it, i continue to reload the homepage and i cannot see older posts, only the first 10 (the newest).
    If i open a post, i can click the “Previous Post” and “Next Post” links so i can see the older posts but only from here.

    I’m using the latest WPBook 2.2.2 and WP 3.1

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author John Eckman

    (@johneckman)

    Thanks @acids76 – others have reported this before too, but I’m not sure how to address it as it works on my blog.

    Note that on http://apps.facebook.com/openparenthesis/ if you hover over the “Next Page” link, it points to:
    http://apps.facebook.com/openparenthesis/page/2

    Whereas when I hover over that same link on http://apps.facebook.com/acidstales/, it just points to:
    http://apps.facebook.com/acidstales/

    The question is why.

    I’ve got wpbook installed on three different blogs for testing purposes, and all three are working.

    The functions that draw those links are get_next_posts_link(); and get_previous_posts_link(); (these are just regular WordPress functions often used in themes).

    The functions are impacted by the filtering we’re doing to strip off the regular blog domain and stick in apps.facebook.com/appname instead – maybe the issue is that you’re using querystring style permalinks?

    Can you use “pretty permalinks” of the /131 style, instead of http://apps.facebook.com/acidstales/?p=602

    Anyone else having the issue @acids76 is having?

    Plugin Author John Eckman

    (@johneckman)

    Did a bit of digging – looks like the querystring based permalinks is the issue.

    In wpbook.php, we filter the page number links differently, using:

    add_filter('get_pagenum_link','fb_filter_postlink_no_qs',1,1);

    So whenever WordPress is drawing the next/prev page links, it gets filtered by our fb_filter_postlink_no_qs function, which chops off the query string.

    Honestly I can’t remember why we did it this way, so I’ll have to investigate what happens if we put it back – it may be that the query string being passed along screws up the Facebook ‘signed_request’ stuff also being passed in qs.

    Plugin Author John Eckman

    (@johneckman)

    Hmm. Just tried it by changing:

    add_filter('get_pagenum_link','fb_filter_postlink_no_qs',1,1);

    To:

    add_filter('get_pagenum_link','fb_filter_postlink',1,1);

    (Removing the _no_qs from fb_filter_postlink)

    And it seems to work.

    @bandonrandon, do you remember why we originally went with a no qs approach? Might be that this changed when we went to POST for Canvas – that it no longer causes problems to use the querystring this way but once did?

    Thread Starter acids76

    (@acids76)

    on my blog i have never used any kind of permalink, i use the default one

    i will try to modify add_filter call as you said as soon as i can. thanks for the tips

    Thread Starter acids76

    (@acids76)

    i have tried to modify as you suggested and now i can see other pages!

    Plugin Author John Eckman

    (@johneckman)

    Great. Still haven’t remembered why we were hiding query strings like that in the first place, so maybe we can just make this change in the next release.

    chauvir

    (@chauvir)

    I’ve added the Blog fuctionality to my own website and it works. I have a problem with the “Continue reading” link. It doesn’t go anywhere when clicked.

    Would you mind taking a look?

    Here is my website link: http://www.pyxels.com/Real Estate Template/blog

    Thread Starter acids76

    (@acids76)

    @chauvir
    …maybe because you have URL with spaces? did you try to use different url location for blog?

    chauvir

    (@chauvir)

    I changed the URL to: http://www.pyxels.com/RealEstateTemplate/blog

    Still no luck.

    Thread Starter acids76

    (@acids76)

    @chauvir
    what kind of version of WordPress are you using?

    chauvir

    (@chauvir)

    I downloaded the newest version. 3.?

    Thread Starter acids76

    (@acids76)

    strange behaviour…. if you don’t put the “more link” in the post, does it work all?

    chauvir

    (@chauvir)

    I’m not sure. I’m still learning how to do this.

    Thread Starter acids76

    (@acids76)

    i mean, did yoy try to write a post without “more link” or it’s added by itself by the template?

    chauvir

    (@chauvir)

    The More link is added by the this code on my web page:

    <?php
    require(‘../blog/wp-blog-header.php’);
    ?>
    <?php
    $posts = get_posts(‘numberposts=10&order=ASC&orderby=post_title’);
    foreach ($posts as $post) : start_wp(); ?>
    <?php the_date(); echo “
    “; ?>
    <h2><?php the_title(); ?></h2>
    <?php the_excerpt(); ?>
    <?php
    endforeach;
    ?>

Viewing 15 replies - 1 through 15 (of 18 total)

The topic ‘[Plugin: WPBook] "More posts" link’ is closed to new replies.