Enavigo

Take lemons, make lemonade or Jill and Yuval’s Musings

Enavigo header image 2

Fix Wordpress ‘Press This’ 404 error

August 27th, 2009 by yuval

Apparently WordPress has a newfangled bookmarklet (newfangled to me) that allows you to quickly post about stuff you love. Bookmarklets are awesome, btw. But it did not work, most likely because I use the search-friendly, meaningful URLs. The post I Googled gives you an idea into how to fix it but it did not work for me. Try this code instead of the one he mentions, and follow his instructions:

javascript:var d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='http://www.YOURDOMAINHERE.com/wp-admin/press-this.php',l=d.location,yz=l.href.replace(///g,'\/'),e=encodeURIComponent,g=f+'?u='+e(yz)+'&t='+e(d.title)+'&s='+e(s)+'&v=2';function a(){if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=720,height=570')){l.href=g;}}setTimeout(a,0);void(0);

Enjoy.

  • Share/Bookmark

Tags:   · · · · · 6 Comments

Leave A Comment

6 responses so far ↓

  • 1 Craig Aug 28, 2009 at 10:47 am

    Can you link to where one can find the bookmarklet?

    And also, where one can find the bug report you added about how it’s broken?

  • 2 Darren Taylor Sep 8, 2009 at 8:15 am

    Where do I place this script?

  • 3 yuval Sep 8, 2009 at 8:43 am

    Darren: This script should be the contents of your bookmarklet.

  • 4 yuval Sep 8, 2009 at 8:46 am

    Craig, the bookmarklet is part of the WordPress installation (Version 2.8?). Log into the administration screen and click ‘Tools’ from the left navigation menu. Under the headline ‘Press this’ you will see a link that you can drag into your browser’s bookmark toolbar to act as a bookmarklet. Then, edit the bookmarklet and use my script above. It is *not* bullet-proof but works better than the original, I think.

  • 5 Darren Taylor Sep 8, 2009 at 9:42 am

    Thanks. I followed your instructions but now if I click on the bookmarklet nothing happens.

  • 6 Timo Steffensen Sep 12, 2009 at 12:52 pm

    These are really amazing. It makes my post easy and quick as I never experienced before in WordPress. You really a good problem solver and I should tell this it out to my colleagues that there is a solution to our problem.