WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. solutionsphp
    Member
    Posted 7 years ago #

    I am getting the error "No Posts Matched Your Criteria" when I click the print link generated by GaMerZ' wp-print hack:
    http://www.lesterchan.net/portfolio/programming.php
    (#8)

    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:
    http://wordpress.org/support/topic/39642?replies=42

    WP 2.0.7.

    Any ideas?

  2. solutionsphp
    Member
    Posted 7 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]
    </IfModule>

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

  3. Lester Chan
    Member
    Posted 7 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
    Member
    Posted 7 years ago #

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

  5. Lester Chan
    Member
    Posted 7 years ago #

    no problem =)

  6. holodoc
    Member
    Posted 7 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
    http://localhost/wordpress/?page_id=3&print=1

  7. Lester Chan
    Member
    Posted 7 years ago #

    did u regenerate permalink again?

  8. holodoc
    Member
    Posted 7 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
    Member
    Posted 7 years ago #

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

  10. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    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

Tags