Entity Decorator module released : beautifully decorate your entities .

Over on the Full Fat Things blog we just published the entity decorator module which we think significantly improves the developer experience for dealing with entities. Entity decorator

From that blog post....


Tired of typing code with deep nested arrays like this to work with your fields?

$item_id = $node->{$this->field_name}[LANGUAGE_NONE][0]['value'];

Of course you are, so you use the Entity API.

What is stopping Varnish and Drupal Pressflow from caching anonymous users page views.

Every so often with Pressflow and Varnish you might find that your anonymous users aren't being cached via Varnish.

A quick way to see whether your anonymous pages are being served is to add some debugging headers to Varnish by adding some code like the snippet here to vcl_deliver()

sub vcl_deliver {
if (obj.hits > 0) {
set resp.http.X-Varnish-Cache = "HIT";
else {
set resp.http.X-Varnish-Cache = "MISS";

and hit them with

curl -I http://yoururl.com

Xdebug on Mac OS X Snow Leopard for use with MacGDBp

If like me you use MacGDBp to debug your Drupal code then since upgrading to Snow Leopard your variable inspector window will basically show unitialized for all variables.

This is fixed in a beta for xdebug Xdebug 2.1.0beta3. I've compiled it as I couldn't find a compiled version on the net and it is here for you to download. xdebug.so (2.1.0beta3)

Economist.com module list

At Economist.com we are building a decent sized Drupal site. I thought I'd do a dump of the modules we have so far using drush.

stew@stewbuntu:/var/www/sprint/drupal$ ../../drush/drush statusmodules
Name Enabled/Disabled Description
Acquia agent (acquia_agent) Enabled Allows Drupal to securely communicate with the Acquia Ne ...

In support of adding hook_page_not_found() to Drupal 7

I want to try and get a hook_page_not_found() to Drupal 7.

I've taken this snippet from http://drupal.org/node/444756

I have only just started this but I wanted to post for opinion. In IRC I was pushed towards using hook_page_alter() instead of defining a new hook. However hook_page_alter() runs after the 404 header has been sent. I don't expect the code as is to get in. Largely I am posting this as a start because I work on large sites (Economist.com) and I don't want to have to use nfs to share the files directory as it adds another single point of failure in the stack.

Easy drupal core hacking

I have found myself attempting to contribute to Drupal core more and more lately. So I wrote a shell script that gets me a fresh copy of head and applies a patch to it.

Essentially I will be looking through a Drupal issue, such as http://drupal.org/node/229778 and I'll want to add to a patch on there. I simply grab the URL of the patch file and run my gethead.sh

./gethead.sh http://drupal.org/files/issues/229778-log-changes-to-offline-mode.patch
Syndicate content