﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
18490,"When installing a new theme, check if parent theme is required.",sterlo,nacin,"Currently I am able to do the following:

 1. Upload a child theme.
 2. Do not have the parent theme installed (for instance, Genesis Framework).
 3. After the child theme is uploaded...I am presented with the option to activate the child theme. Even though the parent theme does not exist.

The child theme can check this by doing something like this...
{{{
function genesis_failed_to_load() {
  echo '<div id=""message"" class=""error""><p>Unable to locate the Genesis Framework!</p></div>';
}

/** Start the engine */
if( file_exists( TEMPLATEPATH . '/lib/init.php' ) ) { 
  require_once( TEMPLATEPATH . '/lib/init.php' );
} else {
  add_action( 'admin_notices' , 'genesis_failed_to_load' );
  return false;
}
}}}

But knowing most people are not using such code, allowing the activation of a child theme without it's parent theme can lead to site breakage.

Fatal errors, etc.

I propose that upon uploading, prior to providing the activation option, we check to see if the parent theme is installed, if it's not...then mark the theme as broken and don't allow them to activate.",enhancement,closed,normal,,Upgrade/Install,3.2.1,normal,duplicate,needs-patch,gary@…
