drupal

Dec 21 2007

Yasn, but something totally different

So the last couple of weeks we've been laughing at different new social networks .. wondering what the use of all those seemingly identical services is as we were looking for that killer extra service they are offering and why on earth (apart from identdity protection) we would want to sign up with with it.

Now Luke just pointed to Puppet being added on Ohloh. I remembered Ohloh and decided it deserved a second look.

I was positively surprised.. Ohloh lets you "stack" the Open Source projects you use then it suggests you with people that use similar tools, or similar tools.

If you stack Drupal it suggests you alternatives you don't need :)

But it also shows you a list of the Top Contributors

If you are an active contributor to a project there is more , it calculates your experience based on your commits in projects.. heck.. not really accurate as it lists me with 3 months C/C++ experience . And you can get Kudo's for your work :)

Now all it needs is being able to link with your friends so you can figure out what tools they are using :)

Dec 19 2007

Getting rid of Blogger

So time had come to move all my other blogs to drupal and move them away from blogger.
When I migrated this blog from dotclear to Drupal I found a php script that grabbed all the content from my dotclear setup and migrated it to a fresly installed drupal. I was hoping to find a similar tool for Blogger .

Well no such luck .. most of the links I found instructed me to first install wordpress, use the import functionality of wordpress then migrate from wordpress to Drupal.

Setting up a Wordpress and importing the Blogger postings took me about 10 minutes. Then the hunt for a WordPress to Drupal migration tool started .. first I ran into into a binary one that seemed to be able to connect too my database but couldn't find the wordpress databases. Next I ran into a drupal module that only worked on 4.6 But luckily at last I ran into http://dojotoolkit.org/~ktiedt/wp2drupal5.tar.gz A drupal module that works with 5.X well. not sure if it does .X but at least with .1 .. (as one of the tests I ran waas on a 5.2 and it failed there)

So a couple of manual changes of users mappings , setting up new themes and some postings on the old blogs that there was a new feed to be subscribed to I was ready to go...

Untill.. I couldn't log on to one of the blogs anymore .. I could ask for a onetime login session, ,manage from there .. then try to log on with the new password and promptly I was shown an Access Denied page . Weird..
The watchdog logs told me that the logon was successfull. but the next entry told me that it was the anonymous user failing access to the protected pages .

Thxn to gnat_x on #drupal_support I cleared my cookies and seemed to solve the issue.
He told me he had seen issues before with settings where www.example.com and example.com conflicted or it might have been beta.example.com and blog.example.com .. He was right.. so I`ll need to figure out how to set my base_url for the different drupals I have running :)

Dec 15 2007

default_value

Everybody who once spent 5 minutes debugging drupal forms will spot the difference..

  1. $form['currency'] = array(
  2. '#type' => 'textfield',
  3. '#title' => t('currency'),
  4. '#size' => 60,
  5. '#maxlength' => 255,
  6. '#default_value' => $dateset->currency,
  7. '#description' =>t('currency')
  8. );

Looks an awfull lot like

  1. $form['currency'] = array(
  2. '#type' => 'textfield',
  3. '#title' => t('currency'),
  4. '#size' => 60,
  5. '#maxlength' => 255,
  6. '#value' => $dateset->currency,
  7. '#description' =>t('currency')
  8. );

Only the second one isn't much use in a form :)

Dec 03 2007

SELECT vs select

I spent way too much time this weekend trying to get the pager stuff in Drupal working for a module I`m playing with.

I had learned a lot from the watchdog module on how paging was supposed to be working and I was trying to do the same with another database. As I got a page limited by the number of records I wanted but I couldn't find any of the fancy next, previous and page number thingies that I wanted.

The watchdog module worked for me and I started stripping the watchdog module till I could actually replace my function with watchdog_overview function. Even replaced the watchdog query with my qeury.. but not such luck.. I couldn't get $output .= theme('pager', NULL, 50, 0); to work.

So as every open source geek does.. I started looking into the code. pager.inc
The header told me the author.. I could mail him and wait or even call him , , but I read on.
$pager_total_items[$element] = db_result(db_query($count_query, $args));
Never returned anything useful.., my mysql log learned me there never was any query with a count ..
Till I modified the pager.inc file to actually perform the query I wanted it to do.. and it started working.
Then I took a closer look at the regexp that was being used to create the $count_qeury
$count_query = preg_replace(array('/SELECT.*?FROM /As', '/ORDER BY .*/'), array('SELECT COUNT(*) FROM ', ''),$query);
However my query was all in lowercase so the count was never inserted.

The only difference between the working watchdog module and my own code was in the use of uppercase SQL statements.
So call me lazy :)

Nov 30 2007

MySQL 5.1 Cluster DBA Certification Study Guide

Apart form the Xen book I coauthored earlier this year the nice folks of the MySQL documentation team asked me to review parts of their MySQL Cluster Certification guide.

After a long wait it's finally out !
In contrary to the other one, this book took over a year to finish because there was actually a lot of reviewing done by different people.

You can buy it now at Lulu.com !

John might want to read it to figure out about his 5th step.

Nov 14 2007

Drupal Registration procedure

As a Drupal newbie I`m wondering about the new user creation process.

Is it just me or is there a part missing int he admin/user/settings form. When you as an admin require users to be approved first. Don't you want the user to recieve multiple mails. One when he registered, telling him that he is awaiting approval/.
Then one when you approved his membership giving him the details on how to log on to the site ? (Or a another one telling him he wasn't approved)

Or am I looking in the wrong places for this feature ?

I see the mail form that will send out a mail that the user iss awaiting approval. But I can't find a template that is being sent upon approval. Neither can I see a mail departing from my system.
I find it a bit weird to send out userinformation to a user that doesn't end up to be a user afterall.

Nov 10 2007

Scaling Drupal

John Quinn writes about Scaling Drupal he is taking a one step at a time approach and is still writing his 4th and 5 stages.

His first step obviously is separating the drupal from a separate database server, and he chooses mysql for this purpose, moving your DB to a different machine is a good thing to do.

However then he gets this crazy idea of using NFS to share his his drupal shared files :(
(he even dares to mention that the setup ease is good) Folks, we abandonned NFS in the late nineties. NFS is still a recipe for disaster, it has performance issues , it as stability issues (stale locks), and no security admin in his right mind will tolerate portmap to be running in his DMZ.
(Also think about the IO path that one has to follow to serve a static file to a surfer when the file is stored on a remote NFS volume)

On top of that he adds complexity in a phase where it isn't needed yet. Because of the fact he needs to manage and secure NFS and he is storing his critical files on the other side of the ethernet cable he did create a single point of failure he didn't need creating yet.
Yes as soon as you start to scale you need to look at a scalable and redundant way to share your files.
When those files are pretty static you'll start out with a set of rsync scripts or scripts that push them to different servers upon deploying your application. When they are changing often you start looking into filesystems or block devices that bring you replication, such as DRBD or Lustre
But if today his NFS server goes down he is screwed, much harder than when his database has a hickup.

One could discuss the order of scaling, but adding more webservers might not always be the first step to take, one might want to tackle the database first depending on the application.
He decides to share the load of his application over multiple Drupal instances using apache mod_proxy , then adds Linux-HA to make it highly available.
I`m interested in knowing why he chose for apache mod_proxy and not for LVS

Although using NFS for me belongs in a How NOT to scale tutorial, his other steps give you a good idea of the steps to take.

I`m looking forward to his next steps :) I hope that in part 4 he also removes NFS in favour of a solution with no performance and locking issues that really takes away a big fat single point of failure. In part 5 he discusses how to scale your database environment. The actual order of implementing step 2 and 5 will be different for each setup.

Anyway.. I`m following up on his next steps.. interesting reading

Nov 08 2007

Barcamp #4: Dec 1 at mVillage

Barcamp Brussels 4 is comming


It’s decided! Barcamp Brussels #4 will take place on Saturday Dec 1st, in the mVillage business center in Schaarbeek, close to the Koninginneplein, Kruidtuin/Botanique and the Brussels North station (thanks for the help, Simon).

Nov 05 2007

OpenSocial

So just when last weekend I started asking for a LinkedIn API , then ran into the Facebook API I ignored Google's OpenSocial announement.

And guess what .. the start for the OpenSocial Drupal is already there.. now when will the code show up ? :)

Nov 04 2007

Plaxo , what's the use ?

I just got an invite to connect to an old collegue on Plaxo Pulse

I`ve been ignoring Plaxo for a while now as the only thing it did for me was keeping an online addressbook.
I already have an online addressbook it's called LinkedIn.

Upon accepting the invite Plaxo proposed me to import my contacts from both Facebook (which I don't even actively use) and LinkedIn . Now this is the first time an app proposed me to import my contacts from LinkedIn.. an API was announced but I haven't found it yet.

I browsed around on the new Plaxo Beta but honestly I can't say I found anything interresting on it so it'ss yet another passive social network account for me.

However it made me wonder if there are already drupal frameworks out there that let you use FaceBook or LinkedIn data. And I promptly ran into the Facebook one still pretty young. I couln't find a LinkedIn one yet however .. altough that one would interrest me more

Any takers ? :)