Contextual links are a great new feature of Drupal 7. Basically, links are added to various elements of the page to make it easy for site editers to make changes to whatever content they currently see.
It turns out that the Update module that comes with Drupal runs some pretty hefty queries. While trying to debug a crazy mysql error we were seeing on one of the sites I work on (http://drupal.org/node/361563) it occured to me that there is no reason why we should have the update module enabled on our production site at all.
Turning it off on production (while leaving it on on staging) gave the site a nice litte pick-me-up especially after clearing the cache.
Recently my cron stopped running completely and when I would manually visit mysite.com/cron.php I'd get a message like this:
Allowed memory size of 134217728 bytes exhausted (tried to allocate 71 bytes) in ...
So how do I debug this? I went to module.inc then added a bit of code to
I develop my sites on two different machines; constantly SVN committing and SVN upping just to keep files in sync between the two. And worse, I'm forever doing mysqldumps to keep my local databases up to date.
And then it dawned on me...
Today I learned a new trick from http://www.pgrs.net/2008/1/23/remove-files-that-are-not-in-subversion that I have been able to adapt to a couple different situations.
svn revert un-modifies files, but it leaves new files lying around as cruft. How do I get rid of them?
This command does the trick:
svn st | grep ^\? | cut -c 2- | xargs rm
Also, if you have added directories, you should also run this command
I've been working on a project that required some pretty heavy-duty customizations to how the user registration form looks and while getting everything to work I learned a few things that have changed the way I look at customizing forms in Drupal. Here is a quick summary of what I already new, and what I know now.
It has been a bit of an adventure getting the SSO module to work with a site that already utilizes the Domain Access module. I got this all working yesterday... hopefully this clarifies things for people. I got a lot of help by reading the UPGRADE.txt that comes with SSO and by reading this issue: http://drupal.org/issues/595802
Drush (Drupal + Shell) is a set of scripts that lets you control your Drupal site directly from the command line. Without every touching your mouse you can clear the cache, do an SQL Dump ,and even download and enable modules directly from drupal.org.
Since inserting Drush into my workflow I've saved hours of downloading modules and adding them into my svn repositories (drush dl); grabbing top-level information about my sites (drush st); and even running some quick code snippits (drush eval).
PathAuto is an elegantly simple module. It lets you create automated alias rules so that your URLs remain relevant and seo friendly based on node types. For example, on this site I have pathauto setup to create a /blog/title-of-post. More correctly I have pathauto setup to create /blog/title_post by using its built in mechanism for omitting certain words from the automated URL alias.
It's simple: Drupal + SVN = happy web developer.
This is the story of how I generally structure my Drupal based sites using Subversion (SVN) to make development, versioning and deployment easy and well-organized. A quick note: this post assumes that you already know the nitty gritty of how to use SVN and the basic setup and structure of a Drupal-based site.