Experimental project

This is a sandbox project, which contains experimental code for developer use only.

When Pigs Fly is a novelty module for developers intended to illustrate some of the potential url conflicts that can be encountered in module development. For Drupal developers, these conflicts can be hazardous to one's sanity.

When Pigs Fly has a companion module -- Baboons Beware, which contains almost exactly the same code. They both create a single silly page at the same location -- /whenpigsfly. The idea is to enable one, then the other, then both, and just observe what happens.

Here is the important stuff:

function wpf_menu() {
  return array('whenpigsfly' => array(
    'title' => 'When Pigs Fly',
    'description' => 'Demonstration of potential url conflicts',
    'page callback' => 'pigsfly_now', 
    'access callback' => TRUE,

function pigsfly_now() {
 return array('#markup' => 'surprise me');

The README.txt file has other suggestions to try as well. You may be surprised at what occurs. The objective is to help developers become aware of potential url conflicts within Drupal.

Read the README file and have a quick look at the code (all 27 lines), including a surprise Help function. This code works as described (with slight mods) in ALL versions of Drupal (6,7 & 8).

see http://sontag.ca/drupal/when-pigs-fly for more information

Project Information