gotcha

Drupal and non-determinism

I was just working on a client site and had an epiphany as to why working with Drupal continues to be a frustrating experience for me.

As flexible and powerful as Drupal truly is, there is still an unacceptable level of non-determinism involved in working with Drupal whether it be in working with existing modules, theming or doing custom development.

Drupal on Winblows gotcha

When I'm away from home, I use my Windows laptop as a dev server. I use the factory distributions of MySQL, PHP, and Apache. They run surprisingly well on Windows.

I've very seldom had any serious problems running drupal under Windows. That is definitely not to say that I'd rely on Windows in a production environment. But it is suitable for a dev server.

I did just spend several hours, however, finding out that if you enable CSS or JS compression in this environment, it can cause Apache to die.

Gotcha when editing nodes programatically

Now this one is pretty annoying to.

I'm writing a module that imports data into nodes. Sometimes this data has already been imported, and I only want to update existing rows with changes, if any.

After pulling in a row of data from the import file, I see if it already exists as a node in my database. If it does, I grab the node ID and load the existing node:

$node = node_load($existing_nid);

I then do some magical stuff and save the node using the standard:

Syndicate content