Posted on

A blogger blogs, always

A writer who waits for ideal conditions under which to work will die without putting a word on paper.
– Kurt Vonnegut

Sometimes I hear people say, "blogging is dead" or "I don’t get any visitors anymore" or "no one reads this anymore." I’ve said it myself. My wife has said it. My blogging friends have said it. My blogging friends who no longer blog have said it and committed blogicide.

Visitors, comments, stats…none of it matters. Write! Writing matters.

Posted on

WordPress 3.4 limited to 90 menu items

I’m working on a WordPress site. The site is to have roughly 106 pages all accessible via the WordPress menu system so that the enduser can add and remove pages from the menu as they like. Unfortunately, WordPress currently only allows 90 nodes (ie. 90 menu items) per menu. I have not figured out if this is a memory limitation, a hard coded limitation, or a setting yet. This must be overcome!

Reference:

Possible solutions:

  • Use add descendants as submenu items plugin
  • Check error logs and make sure max post vars was not exceeded. If so, increase in either .htaccess or php.ini
  • See if suhosin.post.max_vars and suhosin.request.max_vars are used with Dreamhost
Posted on

Changing the behavior of WordPress’ Publish button

A long unrealized goal of mine has been to change the behavior of WordPress’ publish button when adding a new post. Today, I’ll spend a little time examining the underlying code.

obert- and pixolin in Freenode’s #wordpress gave me good pointers to the WordPress forum and the WordPress hook directory.

I narrowed it down to two functions: wp_insert_post() and wp_publish_post(). Turns out that the correct function is wp_insert_post(). The only thing that wp_publish_post() does is to transition the status. Looks like I should be able to alter wp_insert_post() in my functions.php file and achieve my goal.

Got it!

Relevant references:

Posted on

WordPress Hooks, Actions and Filters – Modifying the Publish function

I’m writing a child theme to twentyeleven and want to modify the administrative post "Publish" function to do some additional processing during the saving of a new post. Does anyone know if there is a hook, action or filter that will allow me to extend the Publish function?

Posted on

Call to action: WordPress Developers Please Comment

Hello WordPress developers! (me included). When you make a theme, I implore you, please use a simple html comment at the top of each page to identify the template. For example: <!- – TEMPLATE: single.php – -> would allow someone unfamiliar with your theme to look in the generated source and see which template(s) are influencing the output. Yes, experienced WordPress developers should already know which files are being used but we don’t write themes only for experienced developers. And even experienced developers get stuck, tired, or would like things to be sped along and a simple comment, <!- – TEMPLATE: page.php – ->, would help tremendously. Thank you!

Posted on

Cannot log into WordPress from Google Chrome

If you go to your WordPress blog’s login page in the Google Chrome browser, type your username and password, and get kicked back to the login screen without an error message, try opening a new tab and logging in from that tab. Seemed to work for me. I also cleared my cache but that did not seem to have an impact. The new tab fixed the problem for me.

Posted on

WordPress 2.8.3 broken! Upgrade to 2.8.4 immediately!

In case you missed it, WordPress 2.8.3 has a programming error which allows anyone to reset your administrative password and takeover your WordPress blog. With administrative access, the hacker could destroy your content, lock you out, and repurpose your website for wrong doing, spamming, pornography, slander, or whatever they want. Upgrade to WordPress 2.8.4 immediately! Learn more at darknet.org.uk.

This vulnerability could be prevented by securing the /wp-admin directory.

BlogSecurity has recommended before that the /wp-admin/* directory should be password protected or restricted to IP address. This would mitigate this problem. See our advisory here for details. [Source, BlogSecurity, WordPress <= 2.8.3 Reset Admin Password Vulnerability]

See details of the exploit at milw0rm.

Posted on

WordPress 2.8.3 upgrade bizarreness

I decided to take some time to make sure that all of our blogs and websites relying on WordPress were brought up to version 2.8.3. Everything seemed to be going well until we started testing Cathy’s blog Domestic Psychology. She can post but cannot add tags. Categories work find but clicking in the "Add new tag" tag box acts like it is disabled. She can type words in the box but the Add button does not function. Tags do not get saved to the post.

So I jump over to Reality Me to see if it exhibits the same behavior. On Reality Me, I can create a post with tags with no problem. But on the dashboard under Incoming Links, Plugins, and WordPress Development Blog, I get a fatal error:

Fatal error: Please call SimplePie_Cache::create() instead of the constructor in /home/www/htdocs/realityme_net/wp-includes/class-feed.php on line 13

I have not tested the other blogs and sites yet. For both Reality Me and Domestic Psychology, I went back and deleted almost all files with the exception of the wp-content directory, the robots.txt, and the .htaccess. I rebuilt the WordPress installation and yes cache directories were removed. WP-Cache is not used. I also repaired and optimized all database tables. Active plugins on Reality Me: Audio Player, Seesmic, ShareThis, SimpleLife, Spam Karma 2, Subscribe to Comments, WordPress.com Stats, and WordPress XHTML Validator. Active plugins on Domestic Psychology: Audio player, Get Recent Comments, Lifestream, ShareThis, Spam Karma 2, Subscribe to Comments, and WordPress.com Stats.

In typing this, I realize that the SimpleLife plugin uses SimplePie and is likely to be the root cause for the Reality Me problem.

Update: Deactivating SimpleLife fixed the Reality Me problem.

Update: Disabling all plugins on Domestic Psychology did not change the fact that Post Tags could not be added to to the post.

Update: I’ve narrowed it down to Cathy’s theme. None of the active plugins on Domesticp Psychology are causing the problem. She is using a Woo theme called irresistible. Disabling this theme fixes lets her use tags with posts again. Time to see if Woo Themes has posted a fix. Yes. irrestible 2.0.0 fixes the post tag problem.

Posted on

ShareThis WordPress Plugin Broken – Easy Fix!

I recently added a ShareThis link ShareThis.com to each of my posts. I chose ShareThis.com because it seems to be very robust while leaving a relatively small footprint on the blog and appears relatively unintrusiveness and benign. Of course, some folks will be quick to point out that the tracking features and having the icon linked back to sharethis.com is very intrusive and anything but benign. In this instance, I don’t see it as that big a deal. One of the attractions to ShareThis.com was its WordPress plugin making setup as easy as going to the website to generate the widget code, then inserting that code in the settings box on the admin screen in your WordPress blog. But it didn’t work.

At ShareThis.com, a publisher generates a script that looks like this:

<script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=abcdefgh-ijkl-mnop-qrst-uvwxyz012345&amp;type=wordpress&amp;embeds=true&amp;post_services=facebook%2Cdigg%2Cdelicious%2Cybuzz%2Ctwitter%2Cstumbleupon%2Creddit%2Ctechnorati%2Cmixx%2Cblogger%2Ctypepad%2Cwordpress%2Cgoogle_bmarks%2Cwindows_live%2Cmyspace%2Cfark%2Cbus_exchange%2Cpropeller%2Cnewsvine%2Clinkedin%2Cfriendfeed&amp;headerTitle=Thank%20you%20for%20sharing!"></script>

After updating, the code will have a 2nd publisher id appended to the end. With two publisher ids, ShareThis will not register your site nor collect statistics.

<script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=abcdefgh-ijkl-mnop-qrst-uvwxyz012345&amp;type=wordpress&amp;embeds=true&amp;post_services=facebook%2Cdigg%2Cdelicious%2Cybuzz%2Ctwitter%2Cstumbleupon%2Creddit%2Ctechnorati%2Cmixx%2Cblogger%2Ctypepad%2Cwordpress%2Cgoogle_bmarks%2Cwindows_live%2Cmyspace%2Cfark%2Cbus_exchange%2Cpropeller%2Cnewsvine%2Clinkedin%2Cfriendfeed&amp;headerTitle=Thank%20you%20for%20sharing!&amp;publisher=a1b2c3d4-ijkl-mnop-qrst-u4w2y10a2r4d"></script>

After reviewing the plugin code, I realized the way ShareThis generates the script must have changed overtime. Crowd Favorite wrote a great plug-in but it expects the publisher=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx to be at very end and if it does not find a publisher id at the end, it puts one there which is why you will end up with two publisher ids. To fix this, simply move the publisher id to the end of the script before pasting the code into the ShareThis settings box in the WordPress admin:

<script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#type=wordpress&amp;embeds=true&amp;post_services=facebook%2Cdigg%2Cdelicious%2Cybuzz%2Ctwitter%2Cstumbleupon%2Creddit%2Ctechnorati%2Cmixx%2Cblogger%2Ctypepad%2Cwordpress%2Cgoogle_bmarks%2Cwindows_live%2Cmyspace%2Cfark%2Cbus_exchange%2Cpropeller%2Cnewsvine%2Clinkedin%2Cfriendfeed&amp;headerTitle=Thank%20you%20for%20sharing!&amp;publisher=abcdefgh-ijkl-mnop-qrst-uvwxyz012345"></script>

Note: In the settings box, the &amp; will be converted to just & but the code correctly uses &amp; with the post. Your code will still be xhtml compliant.

Posted on

Spam Karma open source or die die die

In case you missed the announcement, Dave who developed Spam Karma is no longer going to make changes or update the code. Instead he has released it as GPL v.2 and created a Google Code repository in hopes that some talented people will pickup where we he leaving off. I wonder if we Spam Karma users had actually donated money toward his efforts if he would have continued.

Spam Karma puts Akismet and other spam fighting tools to shame. I think in all the time I have been using Spam Karma, I have had only one false positive. I get false negatives on trackbacks but that is because it was only recently that I realized I could change the settings for how Spam Karma handles trackbacks so I’m still making adjustments.

I also found Dave’s comments on a WordPress replacement very interesting. Specifically he notes, "If you look at it, blog systems are over 10 year old now. Their UI have barely evolved since the first versions. … There is a bad need for a groundbreaking platform that would get rid of ten years of accumulated UI habits."

Posted on

Cutting a plugin loose – Goodbye WP-Project

I liked the concept of WP-Project. It’s a WordPress plugin which adds a tab in your dashboard for project management. It was inspired by Basecamp (collaboration piece for project management) and Harvest(er) (a timetracker). Conceptually we like to spend a lot of time in our dashboards so why not do our project management there too? I just didn’t find the plugin robust enough for my needs. And if it was robust enough, I’d be concerned that my database, which already has issues with Spam Karma eating its space, would fillup too quickly. (n.b. The database has a 100MB allocation.) For now, I’m going to try out Zoho’s project management.