I encountered an error likely of my own creation.

I have multiple sites under one Drupal install (Drupal multi-sites). One of them inadvertently had Misery enabled before Manifest was a dependency.

When installing Manifest, I didn't enable it for (at least) one of the multi-sites.

When accessing one particular site, I got the error found in Title. Unable to navigate to anywhere within the site to turn on Manifest nor to turn off Misery. Nor could anyone reach a contact page to notify the administrator.

Since there are currently 109 reported Misery installs and 13 Manifest installs, someone may find this handy at some point.

Note that the 6.x-2.2-dev version seems dramatically different and you may not need this code for that version. For that reason, I haven't posted this as a patch. If necessary I could do that though.

function misery($type, &$params = array()) {
/**
 * On a Drupal multi-site installation, if one of the sites had Misery
 *	enabled *before* Manifest became a Misery dependency, and that site
 *	did not get Manifest enabled, you're locked out of that site with 
 *	this message:
 *
 *	Fatal error: Call to undefined function manifest() 
 *	in /.../drupal/sites/all/modules/misery/misery.module on line 264
 *
 * So, below is an attempt to check for Manifest, perhaps warn instead of
 *	just dieing.
 */
	if (!module_exists( 'manifest'))
		{
		global $base_url;
		drupal_set_message('Module Manifest needs to be enabled for this '
			. 'site for Misery module to work! '
			. l('Enable it here.', $base_url . '/admin/build/modules')
			, 'error', FALSE);
		return;
		}
  $endures_misery = (!user_access('administer misery') && manifest(array('misery' => TRUE)));

Comments

danielb’s picture

Status: Active » Fixed

I've added some similar code to the module, may as well.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Added function name to help locate where the changes occur. Now changes are preceded and followed by one line of original code...