admin's blog

Form built with drupal_render() won't submit

You may chose to render form elements individually in your custom theme. In that case you need to remember to add the following elements to your output:

 

drupal_render($form['form_build_id']), drupal_render($form['form_id']) and drupal_render($form['form_token'])

 

If you do not include them Drupal 7 will ignore the form submission (and your submit handler(s).

Bluetooth PAN: Windows XP Client, Mac OS X 10.6 Host

 

I don't think I could make the title any clearer or search engine friendly and I hope no one ever has to lose sleep over this ever again.

Trinidad and Tobago CIF for Ubercart

As a Drupal developer sometimes you discover that a feature or resource that a client needs is not available. It is the spirit of the community to contribute such items if you have the ability to do so.

We discovered that our country "Trinidad and Tobago" is not available in the countries and zones settings area of Ubercart so we decided to create the import file for it.

Manually importing Ubercart product images

The problem

We have 81 products in a database without images. We need to upload these images as a batch and get the products to point to the images.

The solution

First we have to do a bit of snooping at the database level. We discover that Drupal maintains a table called 'files' containing our files and file paths. This implementation contains a CCK table called 'content_field_image_cache' linking the nodes to the image files. Files are stored in /sites/default/files. Nice.