wp-print and "No Posts Matched Your Criteria" (10 posts)

  1. solutionsphp
    Posted 8 years ago #

    I am getting the error "No Posts Matched Your Criteria" when I click the print link generated by GaMerZ' wp-print hack:

    I have tried with permalinks enabled and disabled to the same effect. I have reviewed and put to use the code examples from this thread, also to no avail:

    WP 2.0.7.

    Any ideas?

  2. solutionsphp
    Posted 8 years ago #

    I have determined that the issue is with .htaccess and permalinks. When I disable permalinks, wp-print works just fine (contrary to what I wrote above... perhaps I was experiencing a cache issue or something?)

    The readme that comes bundled with the plugin says to find this line:

    RewriteRule ^archives/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/?([0-9]+)?/?$ <BLOG URL>/index.php?year=$1&monthnum=$2&day=$3&name=$4&page=$5 [QSA,L]

    and replace it with:

    RewriteRule ^archives/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/print/?$ <BLOG URL>/wp-print.php?year=$1&monthnum=$2&day=$3&name=$4 [QSA,L]

    Only, that line is not found in my .htaccess file! All I have is this:

    Options +SymLinksIfOwnerMatch
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    Is there mod_rewrite expert here who can advise what the proper RewriteRule should be to enable wp-print?

  3. Lester Chan
    Posted 8 years ago #

    I think u may get the old version of wp-print (because the manually way of editing the htaccess is way too long ago), can u try redownloading it again? make sure the zip name is wp-print210.zip.

  4. solutionsphp
    Posted 8 years ago #

    Thank you so much! You were of course totally right and the new plugin installs very easily. Thanks again!!!

  5. Lester Chan
    Posted 8 years ago #

    no problem =)

  6. holodoc
    Posted 8 years ago #

    Mmh I have a similar problem with the lastest version.

    If I change permalink structure from default to date and name based, I get "No posts matched your criteria." when trying to print a page which is linked http://localhost/wordpress/index.php/pagename/printpage/
    then while the default where it works is

  7. Lester Chan
    Posted 8 years ago #

    did u regenerate permalink again?

  8. holodoc
    Posted 8 years ago #

    I'm not sure what you mean, I change the permalink option and click on "Update Permalink Structure" - anything else I have to do?

  9. Lester Chan
    Posted 8 years ago #

    nope, just click on it, like maybe twice to be sure.

  10. While wp-print is indeed neat, there is a simpler and easier way using CSS. I would recommend that instead.

    Some details are here: http://ottodestruct.com/blog/2007/06/22/geekery-and-beer/

    Simply print the page using a modern browser (or view the "Print" version in the CSS menu of Firefox with Web Developer tools), and you'll see how it looks a lot different on the printed version than on the screen version.

    Note that you cannot do *anything* with CSS, so if you want actual changes to the page, like different content or something, you'd have to hide it in the normal version but show it in the print version. That can take some extra theme editing to do this sort of thing.

Topic Closed

This topic has been closed to new replies.

About this Topic