Eric D. Schabell

Thursday, March 22, 2007

Fix for WordPress blank screen on submit of new post!

I finally took some time to fix this problem on my sites. I am running the newest version of WordPress (2.1.2) but have had this problem forever. Upon a submission of a new post I would get a blank screen. The URL was referring me to wp-admin/post.php so I started looking there for the answer.

This problem has been reported in diverse blogs in one form or another but without a fix that I could apply, such as this WordPress Support Forums entry. I hope this clarifies at least a fix that will get you past the blank screen effect when posting! ;-)

Here is a display of the diff you need to apply:
+++ post.php    2007-03-22 14:57:54.000000000 +0100
@@ -168,6 +168,50 @@
break; default:
+       // 22 March 2007 - Eric D. Schabell 
+       //
+       // fix for blank screen posting of content, after submit now
+       // checking if coming from a new-post screen, if so then we
+       // just submit the post.
+       //
+       $sendback = wp_get_referer();
+       if (strstr($sendback, 'post-new.php'))
+       {
+               $parent_file = 'post-new.php';
+               $submenu_file = 'post-new.php';
+               check_admin_referer('add-post');
+
+               $post_ID = 'post' == $action ? write_post() : edit_post();
+
+               // Redirect.
+               if (!empty($_POST['mode']))
+               {
+                       switch($_POST['mode']) {
+                               case 'bookmarklet':
+                                       $location = $_POST['referredby'];
+                                       break;
+                               case 'sidebar':
+                                       $location = 'sidebar.php?a=b';
+                                       break;
+                               default:
+                                       $location = 'post-new.php';
+                                       break;
+                       }
+               }
+               else
+               {
+                       $location = "post-new.php?posted=$post_ID";
+               }
+
+               if ( isset($_POST['save']) )
+               {
+                       $location = "post.php?action=edit&post=$post_ID";
+               }
+
+               wp_redirect($location);
+       }
+       // end fix.
+
wp_redirect('edit.php');
exit();
break;
For those that do not understand how to apply such a patch, you can edit your wp-admin/post.php file and add all the lines you see above with a plus (+) in front of them. They need to go at the front of the 'default' section of the 'switch' statement, starting at line 171 in my post.php file.

PS. Since upgrading to Wordpress 2.2 and thereby having to upgrade all my plugins, this problem vanished for me. You might want to consider upgrading your plugins to solve this for your installation, that is most likey the problem.

Monday, March 19, 2007

Dolly Parton in the Nethlands!

This weekend I was away with my wife for a few days of quite (kids off at Oma/Opa’s) and relaxation. The high point was the visit of Dolly Parton (61 years young and still kickin’ it on world tours) on her World Tour 2007 Europe!

She stopped into only two countries on the European mainland (Norway and Holland), treating us to a two hour show in the Ijsselhalle in Zwolle. She sounds great live with a voice that has not lost a bit of clarity, strength or beauty over the years. She entertained everyone with songs from older albums and newer ones too. Songs like 9 to 5, Jolene, Little Swallow, Puppy Love and I Will Always Love You. She even did a duet with Elvis (live on stage, who says Elivis is dead?)!

Real photographers were in the hall at the beginning and they have better pictures than I do, for example the weblog zwolle.


Pre-game show!


Pre-show stage!


Look close, there's Dolly!


Friday, March 16, 2007

CML Framework prototype completed (v0.3.1)!

This project is running for some time now and is considered to be the core of our Collaboration Modeling Lab (CML).

It is a model generation framework prototype to be used to validate the IRIS departments main research line has been completed. This is the first release that takes the process from the logbook through to a generated ORM model via the distiller. For more details you can examine the code at the CML project site and for a quick vi
sual of the design I have included a generic class diagram below:


This framework is being developed in Java 1.5, with parser generation being handled by Antlr, Unit Testing with JUnit4, back-end database access via the java MySQL connector, and runs currently in the Eclipse framework (using 3.2.2).

DB2 Express - C, DB2 for the masses!

I stumbled across this today and could not resist bookmarking the info here, DB2 Express - C is a free version of the powerful IBM DB2 enterprise database and you can run it on Linux!

I started my IT career at IBM here in the Netherlands, doing DBA work for the Logistics Center (IMPL) which was a complete dive into the deep end of the DB2 pool for me. I never forgot how amazed I was at what all those experienced IBM DB2ers could do with a DB2 setup and have often missed that power when working on Free Software solutions for my current work.

Now don’t get me wrong, I love my MySQL and Postgresql databases as much as the next guy. Take a look a the Zen and the Art of Ruby Programming blog and specifically the posting Python, Django and DB2: we need your input!

To quote the article, ” DB2 Express – C is entirely free and the code base is no different from the commercial version. This is a rather different approach from other vendors, whose “express versions are often crippled by design. There is no database size limit, no limit on the number of instances or databases and no restrictions on the number of users or connections. DB2 Express – C license requires only that it is used on a Linux or Windows server, with a maximum of 4 cores (32 or 64 bit) and 4 GB of memory. That’s it. This is pretty much a generous license given that most developers, startups and even medium sized businesses won’t need anything more than 4 cores with 4 GB of RAM for their dataservers.” This is something special and the reason I have always been a supporter of the IBM mentality with regards to supporting Free Software / Open Source Software in the form that they do. Some of the people in IBM really do get it! ;-)

I look very much forward to trying out the DB2 Express - C soon on an upcoming research prototype at my current work. It should be fun to get back into the DB2 world again and here is some information to get started along with support forums.

Happy DB2ing to all! ;-)

Sunday, March 11, 2007

Ride to Uden today

I took a ride over to Uden today, was really great with temperature at around 16 degrees in the sunny south of the Netherlands. I had also just picked up shoe booties to keep my toes warm in the sometimes brisk cool weather we have in the early spring.

It was a 35km ride and I was hauling butt, averaged almost 32km/hour up to Oss and ended in Uden at 29.6 km/hr with total ride time 1 hr and 11 minutes. Felt pretty fit! ;-)

Wednesday, March 7, 2007

Installing Beryl on Ubuntu is easy!

I thought it might be nicer to include the beryl installation instructions here as they are nested pretty deep in the article I posted, 30 Days with Linux, a complete story.

Here is a quick start of what I did to get beryl on my system:
# ADD TO SOURCES LIST:
#
$ sudo vim /etc/apt/sources.list</pre>

# Add lines:
#    deb http://ubuntu.beryl-project.org/ edgy main
#    deb-src http://ubuntu.beryl-project.org edgy main

# For the GPG key (remove the spaces between 
# 'root @ lupine.me.uk.gpg', this is needed 
# to post to blog):
#
$ wget http://ubuntu.beryl-project.org/[email protected] -O - | sudo apt-key add -

# Update your sources listing.
#
$ sudo aptitude update

# Enable AIGLX:
#
$ sudo vim /etc/X11/xorg.conf

# Under Section "Module", make sure that the following lines
# are included:
#
Load "dri"
Load "dbe"
Load "glx"

# Under Section "Device"  add the following:
#
Option  "XAANoOffscreenPixmaps"

# Add following to bottom of file if not present:
#
Section "DRI"
Mode 0666
EndSection

Section "Extensions"
Option "Composite" "Enable"
EndSection

# Restart the xserver by either logging out and into your desktop,
# or restarting the managing package, in this case it is kdm for my
# KDE desktop.
#
$ sudo /etc/init.d/kdm restart

# Install Beryl and its themes
#
$ sudo aptitude install beryl emerald-themes

# Starting Beryl
#
$ beryl-manager

# Enjoy the show by opening a few windows, move them around
# and for some real fun try rotating your desktop cube as fast
# as you can hit:
#
CTRL+ALT+RIGHT-ARROW

I was just tickled pink and happier than a pig in shit with this stuff! ;-)

Tuesday, March 6, 2007

30 Days with Linux, a complete story

This is a very good article written by someone stepping off of windows completely for 30 days to give Ubuntu a try. He goes into great detail and provides both beginners information, but also a comprehensive guide to more experienced users to setup all kinds of software components on Linux (for example the more advanced beryl desktop setup).

Take a look, it is worth a browse at the [H] Consumer site.

Monday, March 5, 2007

The Feegle Free-Fall game online!

This was just too funny not to immortalize here with a posting and a link.

I was put in touch with the Terry Pratchett Books site and found this in there. It is a game based on my favorite characters out of the Dicsworld series, the Nac Mac Feegles a.k.a. The Wee Free Men! They are rough-neck boys that love to fight but prefer to attack with headbutts, also speaking a language that you have to place in the Scottish accents field to even read (try it in his books, you will see what I mean)!

The game is called Feegle Free-Fall, try it, lots of fun online! ;-)

Sunday, March 4, 2007

AbTLinux progress, install a package is working!

I have made another push on the coding of abt, the AbTLinux package manager. We have now got a basic install for the standard software package build cycle of configure, make and make install. This includes configure, build and install logs.

There is still much to do, but the basic framework is starting to appear. As things are getting more stable in my world I am trying to commit at least a few hours in the evenings each week to coding. Watch the progress in the AbTLinux Trac.

Friday, March 2, 2007

Some general silliness in the Dilbert Blog!

This is just a general interest funny note posting.

I got a comment included on Scott Adams blog site. You can find it here in his funny ideas on “Speaking of Archeology”, just search the page for my name! ;-)

Monday, February 26, 2007

Site showing blank screen (WordPress) for a few hours

I was faced with a blank screen this morning when trying to respond to a comment someone posted to my site. I did some digging and found this on the WordPress Support pages

It seems my site is consuming a bit too much memory as it has grown over the years, so I expanded my php memory allowances to 16M. This has solved the problem. For the technical persons out there, you just need to up the settings in your php.ini:

# edit your php.ini file, mine is in /etc/php.ini
#
$ vim /etc/php.ini

# change the 'memory_limit' variable to 16M
#
memory_limit=16M
Hope you all did not miss my site too much while it was down! ;-)

Sunday, February 25, 2007

Running Ruby unit tests in Eclipse (AbTLinux project)

I have been playing with running the diverse unit tests and constantly having the problem with needing to be root (su is requested if you run these tests as a non-root user).

The solution was rather simple, just start your eclipse with sudo and the results here are that you see the unit tests executing in the eclipse console. Some are failing as we are in the middle of implementation:



Wednesday, February 21, 2007

MacPorts MySql server install howto

I have a nice new macbook and wanted to setup my development tools; eclipse, php, macports, and mysql. Here is the steps to get mysql server working (mysql5 in my case):


# install server and the launch script
# needed to start it. (I like the -v option
# to see what is happening.)
#
$ sudo port -v install mysql5 +server

# initialize the setup as mysql user.
#
$ sudo -u mysql mysql_install_db5

# start mysql and set your root password.
#
$ sudo -u mysql /opt/local/lib/mysql5/bin/mysqld_safe &
$ sudo /opt/local/lib/mysql5/bin/mysqladmin -u root password '[new_passwd]'