Drupal

Learn

Drupal

warning: Creating default object from empty value in /var/www/vhosts/mugginsoft/site/drupal/prod/drupal-6/modules/taxonomy/taxonomy.pages.inc on line 33.

Importing and Embedding Existing HTML Content into Drupal

Posted in:

This is just a run through list on importing existing HTML content into Drupal.

In my case I have a lot of RTF content that I convert into basic HTML. I then want to import that HTML content into Drupal and incorporate it into the existing site structure.

Using Git to Manage Drupal Development

Posted in:

We have a Drupal installation with a git repository in the Drupal root folder at .git. Further development is required so we want to clone our repository, make our changes and then push the mods back into the main repository before merging.

The first step is to create a branch, say new-dev, to work on.

Drupal CSS Debugging for Internet Explorer (IE6 and IE7)

Posted in:

IE6 and 7 are the source of trouble as usual.

This is just a basic check list for dealing with this delightful stuff.

  1. Get the Internet Explorer Application Compatibility VPC images for IE6 and IE7 from http://www.microsoft.com/downloads/en/details.aspx?FamilyID=21eabb90-958...
  2. The above images lack the DOM browser known as the Developer Toolbar - get it from here http://www.microsoft.com/downloads/en/confirmation.aspx?familyid=95E06CB.... This DOM browser works in IE6 and 7.

Drupal Template Override not Working

Posted in:

Drupal template overrides only work when a copy of the file being overridden is also present in the same folder as the override template file.

This is documented here http://drupal.org/node/190815#template-suggestions.

Note that this applies to CCK overrides too. So if a CCK template file is overridden you must copy the original CCK template out of the CCK module and into your theme template folder.

Google webmaster reports page unreachable but users can browse page

Posted in:

In this case the Google webmaster crawl reporter was indicating a large number of pages in a Drupal site as unreachable - 500 error. Users however could access the problem pages without difficulty or delay.

Creating favicon ico files on OS X

Posted in:

The ICO image format is a Windows format for representing icons at various resolutions. It is also widely used to represent favicons. It is thus somewhat similar in intention to the OS X ICNS format. Indeed you can create and edit ICO files using the Icon Compose app that ships with Xcode. It lives in /Developer/Applications/Utilities/Icon Composer

Automatically log in authenticated Drupal user

Posted in:

In some cases it may be desirable to externally access authenticated user paths on our Drupal site. I use this approach to kick off various admin functions.

Duplicate a Drupal Installation

Posted in:

Duplicate the MYSQL Database

Our initial database is named drupal_live

Dump out the database as sql.

cd ~
mysqldump -u root -pPASSWORD drupal_live > drupal_live.sql

In phpMyAdmin create database drupal_dev. We can either grant all privileges to our new database to a user of the old database or generate a new user specifically and grant them the required privileges.

Then import the dump into the new database.

mysql -u root -pPASSWORD drupal_dev < drupal_live.sql 

Duplicate the Drupal Installation Files

Automatically extract zipped attachments received on postfix mail account

Posted in:
The desire here is to call a Drupal path when email is received on a specific email account. The email in question contains a zipped archive of images that we want to import into Drupal.

Drupal on mac OS X using XAMPP with virtual hosts.

Posted in:

The use of virtual hosts allows us to effectively develop using XAMPP in a way that is similar to final deployment. It also allows for multiple installs of Drupal and permits developing for multiple sites using a single Drupal installation.

In this case we are aiming to set up a development virtual host installation with a URL of www.mugginsoft.local

Syndicate content