My Plugins And WordPress 2.7

I tested both 1.31/2.31 version as well as 1.40/2.40 version of my plugins and they appear to work fine in WordPress 2.7 EXCEPT for WP-Email and WP-Print. It is because for some reasons the canonical redirect happens before my template redirect and hence /email/ will always be an invalid page in WordPress eyes. This issue is not present in Wordpress 2.6.

My efforts had paid off when my plugins undergo major cosmetic changes back in WordPress 2.5 to accommodate the new WordPress 2.5 design. It is because for WordPress 2.7, I need not do anything and the design just fits right in. I just need to add in the icon for the admin menu for WP-DBManager, WP-DownloadManager, WP-Email, WP-Polls and WP-PostRatings.

Here are the fixes to get WP-Email 2.31 and WP-Print 2.31 to work with WordPress 2.7. I will not update WP-Email 2.31 and WP-Print 2.31 with this fix, instead I will just leave the fix to be downloadeded on this site. Do note that the fix will make WP-Email and WP-Print work for WordPress 2.7 ONLY.

Here is the fix for WP-Email 2.31:

In wp-email.php:

Find (Line 106, Line 120, Line 134 & Line 147):

1
$rewrite_rules = array_slice($rewrite_rules, 4, 1);

Replace:

1
$rewrite_rules = array_slice($rewrite_rules, 5, 1);

Find (Line 758):

1
add_action('template_redirect', 'wp_email');

Replace:

1
add_action('template_redirect', 'wp_email', 5);

Alternatively you can download the fixed wp-email.php:

  WP-Email 2.31 Fix For WordPress 2.7 (11.4 KiB, 447 hits)

Here is the fix for WP-Print 2.31:

In wp-print.php:

Find (Line 79 & Line 95):

1
$rewrite_rules = array_slice($rewrite_rules, 4, 1);

Replace:

1
$rewrite_rules = array_slice($rewrite_rules, 5, 1);

Find (Line 395):

1
add_action('template_redirect', 'wp_print');

Replace:

1
add_action('template_redirect', 'wp_print', 5);

Alternatively you can download the fixed wp-print.php:

  WP-Print 2.31 Fix For WordPress 2.7 (4.2 KiB, 548 hits)

After uploading the fix, you need to regenerate permalink. Go to (WP-Admin -> Settings -> Permalinks -> Save Changes)

I have already committed these changes to WP-Email 2.40 and WP-Print 2.40 to the SVN.

Tentatively WP-DBManager, WP-DownloadManager, WP-Email, WP-Polls and WP-PostRatings will work for Wordpress 2.7 only because of the new icon in the admin menu.

Tags: ,

Email This Post Email This Post Print This Post Print This Post

1 Star2 Stars3 Stars4 Stars5 Stars (44 votes, average: 4.18 out of 5)
Loading ... Loading ...

 

30 Responses to “My Plugins And WordPress 2.7”

  1. Thanks so much for the fix! You might want to remind people to resave their permalinks. I had to do that to get things working again. But that just could be my situation.

  2. Lester Chan says:

    Thanks, updated the post

  3. Ferik says:

    Thank you for this plugin :-)

  4. Barry says:

    I am using this plugin for the InstantKeywordSolutions.com and when I click on the ‘email this post’ link, it gives the error message. I also updated the plugin as required per above. For your easy reference, here is the link to a post:

    http://www.instantkeywordsolutions.com/keyword-tools/free-keyword-tools/kwmap-review/

    Looking for your help,

  5. Patricia says:

    Thanks for the fix! I had to apply them manually because I cannot get your download links to work. Would that be a Firefox problem? That’s my browser…

    In any case, with the fix all working again on my first 2.7 blog :-)

  6. Lester Chan says:

    Try again, it should work now, thanks for the feedback :)

  7. Bradley says:

    Thanks, that did the trick!

  8. Frederic says:

    Thank you! The fix is working perfectly. I use it for my green site : http://www.greenphotographersnetwork.com

  9. Ralf says:

    The plugin wp-print don´t work anymore with WP 2.7, WP-email don´t work.
    Perhaps it´s a german wordpress ? I don´t know why.

  10. zapata says:

    WP-Email still does not work for me in WP 2.7. I replaced the wp-email.php file but redirect does not work. Instead I get page not found.

  11. zapata says:

    I have wp-super cache. So I cleared cache to see if that would help. Still did not work.

  12. Lester Chan says:

    WP-Email works 100% with WP2.7. It is not tested with any caching plugin.

  13. [...] Lester Chan (Gamerz) reports that current versions of his Plugins work fine in WordPress 2.7 except for WP-Email and WP-Print due to the new canonical redirects, which he has offered a fix for download. [...]

  14. Jaqueline says:

    In the beginning the fix was not working, but after I updated the permalinks structure, it started to work as magic!
    Thanks for your plugin, it is really very helpfull.

  15. Josh says:

    Grr.. WP 2.7 here with latest updates published fix files above. Updated permalinks and all but still no links. First time installing so not sure if it could be something else. Any suggestions appreciated.

  16. Lester Chan says:

    Use WP-Email/WP-Print 2.40. If you read carefully, the fix is for 2.31!

  17. Amanda says:

    Thank you, thank you, thank you! :) WP-Print and WP-Email are now working perfectly using the php code. But using the [print_link] code just displays the actual text “[print_link]” in the post. I tried deactivating, deleting, re-uploading, and activating again with no change. Anyone else with this problem? Example on this page:

    http://www.kevinandamanda.com/recipes

    Thank you again! :)

  18. Lester Chan says:

    Try typing it in the HTML editor. I am unable to reproduce this problem. If this problem persists, it looks like a plugin/theme conflict or a problem with your WP

  19. Amanda says:

    Hey Lester, thank you so much for the quick response. :) I think I figured it out- my [print_link] was located between [donotprint][/donotprint] tags. But when I moved it outside of the tags, it worked properly. Hah, this seems obvious now that I say it, but I swear it worked in the old version! LOL Fortunately I don’t have too many posts so I can go through and change them all. :)

  20. Mark says:

    thanks it worked!

  21. scysys says:

    Version 2.40 will not work for WordPress 2.7

  22. Lester Chan says:

    2.40 WORKS with WP2.7. I have tested it and it is MEANT for WP2.7. So unless you can reproduce the problem on a fresh install of WP2.7. Please do not say it does not work to mislead people.

  23. Chris says:

    Installed 2.4 and nothing shows up on my site…check and see. I am NOT a WP expert so it very well could be my fault or the template I am using. Your help is appreciated.

  24. Chris says:

    sorry for the recent post, I’m an idiot, it works perfectly. It really helps to put the link in your page files.

    http://lesterchan.net/wordpress/readme/wp-print.html

    Look under usage

  25. Lester Chan says:

    The readme.html IS included in the zip

  26. rudy says:

    Hi Lester, thanks for this info.
    I used most if ur plug-in since it’s worked & recommended by michael jubel for arthemia theme.

  27. Lester Chan says:

    Hi Rudy, Yea, I saw my stats, a lot of hits coming from michael jubel’s site =D This theme is excellent =D

Leave a Reply