Solution

Build Drupal Taxonomy list into a Block

  • Create new block (Home › Administer › Site building › Blocks › Add block)
  • Put following code into "Block body", set $vid as mentioned in the comment
  • Set "input format" to "PHP code"

`<?php $vid = 1; // Set the vid to the vocabulary id of the vocabulary you wish to list the terms from $items = array(); $terms = taxonomy_get_tree($vid); foreach ( $terms as $term ) { $count = db_result(db_query("SELECT COUNT(nid) FROM {term_node} WHERE tid = %d", $term->tid)); $items[] = l($term->name, "taxonomy/term/$term->tid") . " ($count)"; }

Move Drupal to sub-directory

One of my production site have just been installed Drupal in the root directory, i.e. visitor browse to www.mysite.com will be brought to Drupal main page. Anyway, our Drupal configuration and contents are not ready yet, so we decide to pull it back - create other few pages as temporary, visitor will see this instead when browse to www.mysite.com. And then, move all Drupal files to new sub-directory, called "drupal", that we can access by pointing to www.mysite.com/drupal. This will let us have a test environment - on a live server, and continue development work at background.

Product image not show up in Ubercart

Problem

  • Upload images for product, it show up on the product "edit" page. (correct)
  • But product image does not show up in Store Administration -> Products (incorrect !)
  • All of the products are listed, but the column for IMAGE says "n/a" for each product (incorrect)

Resolution (thanks to source)

  • Go to Content management -> Content type -> Field
  • Delete "image" field from "Product"
  • Go to Store administration -> status message -> images
Syndicate content