Do Drupal themes have to use the GPL?

Drupal: 

The GPL is an open source licence. Drupal is an open source content management system that lets you use any compatible theme. The Drupal site, like Wordpress and many other open source projects, claims Drupal themes have to use the GPL because the themes are derivative works. Is this true? If you are a theme developer, are you limited to the GPL?

Some claims for the GPL

There are lots of reasons why people claim a theme is a derivative work of the content management system using the theme. Here are some of the misused ideas and why, individually, they do not work.

They do not run separately

There is an idea that the theme must be a derivative work because the theme runs within the application. In our example, the application is Drupal and Drupal is running within PHP and PHP is running within Apache and Apache is running within Windows or Linux or Unix. The theme should therefore adopt the proprietary licence of Windows and the conflicting GPL of Linux and the conflicting BSD licence used for some Unixes. You cannot run Drupal without PHP but PHP has a special clause in the special PHP licence to exempt applications running under PHP from having to adopt the PHP license. Apache uses a special license instead of the GPL for the same reasons.

The GPL is not common among the major containing applications because they might limit the scope of programs they can contain and limit their own future. Drupal will limit the future of Drupal if Drupal sets restrictions on what licence you can use for themes or modules used with Drupal.

They run as a cohesive unit

Cohesive is a useless word. Apache runs as a cohesive unit with Windows and does not adopt the license from Windows. Java runs as a cohesive unit with Windows and Java based applications still crash frequently because cohesion is not enough. Cohesion means they stick together, it does not mean an exact fit. It does not stop either side from sticking to something else.

The code in your theme or module can run within another content management system with minor adjustments. That happens all the time. The fact that you may not have created a version for another CMS does not mean you cannot. In the Drupal case, you see lots of modules under sites/all/modules that use code under sites/all/libraries. The libraries section is for external code. If Drupal jumped on you to license your code as GPL, you could place your code under libraries with your license and use only a thin GPL layer under modules. They would all be cohesive and Drupal could not lay claim to the library part without placing the same demand on a lot of other code, something that would kill the use of Drupal.

They do not run in a sequential order

There is a claim that two separate pieces of code must be one if the separate pieces of code have multiple interactions that are in in a sequence. Have the people making this claim ever looked at the connection between any other blocks of code? Their definition applies to the millions of interfaces between application modules all over the world and most are not GPL to GPL. The interface between a car and the computer controlling the engine ignition is the same but the computer does not have to be licensed the same way as the car.

If this claim was successful, your applications would have to adopt the license of your printer's software because your applications interact that way with printers. The examples are endless. You could never use any GPL code on Windows because they would all have to adopt the Windows license. Unix uses the only truly open license, a BSD style license, and the GPL could not be used by any software running on top of a BSD licensed Unix.

is loaded via the include() function

The Software Freedom Law Center claim code is a derivative work if it is loaded by the PHP include() function. The include function is the normal way of loading external code into PHP, the same as placing food in your mouth is the normal way to start eating or placing a DVD in your DVD player is a normal way to play movies. A movie is not subject to the copyright of the movie player. The commercial food you eat does not have to adopt your license for food. The examples are endless.

Drupal/Wordpress does not load the code. Drupal/Wordpress asks PHP to load the code. PHP does some checking then passes the request to Apache or the operating system. There may be other layers involved including virus checkers. If inclusion was a valid claim, your code would have to adopt the license from PHP or Apache or the operating system.

If the modules are included in the same executable file, they are definitely combined in one program.

The Software Freedom Law Center say modules are one program when combined in one executable file but PHP code is not combined in one executable, the PHP based modules remain as separate code even during execution, which means this statement does not apply to your PHP code in themes or modules.

If modules are designed to run linked together in a shared address space, that almost surely means combining them into one program.

Another Software Freedom Law Center claim. Not the use of almost. Depending on your operating system, you shared address space also contains Apache, PHP, and lots of other code with lots of different licences. Apache is loaded first which means all the others should adopt the Apache license. Some operating systems use multiple address spaces under Apache then share part of the address space to share data. That makes multiple address spaces one shared space.

This is a useless claim. It is the equivalent to saying the paintings in a gallery share the same space and therefore have to have the same copyright owner.

Offer a theme under a split license

Some people suggest you license your theme code under the GPL and license everything else another way. The problem is the GPL proponents also claim that downloading something as a group makes the GPL infect the rest of the download. To comply with all interpretations of the GPL, you could have to offer separate downloads or bundle the two parts of your theme for separate installation then zip them together into one download. If there are two separate bundles and two separate installation steps, you bypass some of the other ugly arguments about the GPL.

GPL is required for distribution

Ok, you work for a company and develop proprietary code. The code is not distributed and does not need the GPL. This conflicts with all the claims that the GPL is based on how the code is used. So who develops code as an employee. Most code is developed by contractors and is distributed to customers, thus requiring a GPL license if you accept the distribution argument.

A contractor can be considered to be working as an employee if paid by the hour but not if paid a fixed price. A fixed price contact requires assignment of ownership. A fixed price contractor can distribute code to the customer even when working on the customer's computers. All the contractor has to do is copy code from a USB memory stick and the distribution happens.

Part of the GPL restricts the way you distribute GPL code by requiring the inclusion of source code and the GPL license. The act of distribution does not make the code require the GPL, people have to prove one of the other claims to make the GPL apply.

Protect yourself

Do you develop proprietary code? Do you use a content management system to contain the code? You might have to project yourself from time consuming and expensive legal action. One day there will be a lawyer who realise how profitable a useless copyright case could be. He/she will talk a content management system owner into suing somebody over the GPL issue. You could be the sucker used as the test case.

The argument at Drupal and other sites is about the code in modules and themes, not the images or CSS, or Javascript. Drupal cannot clamp the GPL on the Javascript because Drupal use jQuery to run most of the Javascript and jQuery would have to make the claim to extend the jQuery GPL to your Javascript. jQuery will not make thta claim because jQuery would be instantly dropped by most users.

You can isolate your proprietary module/theme code from Drupal/Wordpress/etc by creating a thin layer between the CMS and your code. Your thin isolation layer is the only bit that would need the GPL if the case was won by a GPL advocate. An isolation layer is easy for modules because many modules already do exactly that. Isolating the code in a htme is less practical because there is not a lot of code in a theme.