Hi i have troubel after install FileField Sources i report it here http://drupal.org/node/1137850 i disable and deinstall the module and i disable and deinstall Entity cache 7.x-1.0-rc2
this error is now on my frontpage...and i see no way to fix it...i upload the drupal 7 dev entity.inc and change it with my existing.. the error don´t go
something must be wrong
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (Zeile 177 von ./includes/entity.inc).

thanks

Comments

eule’s picture

Status: Active » Fixed

seems thats is definitiv a problem with http://drupal.org/project/filefield_sources

Status: Fixed » Closed (fixed)

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

Tengu’s picture

Yes, definitely. I got this error during simple using the field API in an own module with no other 3rd Party modules installed and minimal fresh installation. Exactly when I try to deinstall the module. I use the Image Field in this module, what uses the file field.

Is there a patch available for this issue or will coming an update for Drupal?

Tengu’s picture

Component: cache system » field system
Status: Closed (fixed) » Active

It's not the cache system, it's the file field API.

I got this error during simple using the field API in an own module with no other 3rd Party modules installed and minimal fresh installation.

Exactly when I try to deinstall the module. I use the Image Field in this module, what uses the file field.

Steps for reproduction:

1. Doing a fresh minimal installation of Drupal 7 and enable the image module (and file of course).
2. Install a module what is using the field API (especially an File Field).
3. Deinstall the module again.

catch’s picture

Priority: Critical » Major
Status: Active » Postponed (maintainer needs more info)

" field API in an own module"

If you are using a custom module, then please provide the code so that people can reproduce the issue.

Tengu’s picture

Of course, sorry for my mistake. Here's my code from the .install file.


function mx_product_install() {

	node_types_rebuild();
	$types = node_type_get_types();

	foreach (_mx_product_field_definitions() as $field) {
		field_create_field($field);
	}

	foreach (_mx_product_field_instances() as $instance) {
		$instance['entity_type'] = 'node';
		$instance['bundle'] = 'mx_product';
		field_create_instance($instance);
	}

}


function mx_product_uninstall() {

	$nids = array();
	$result = db_query("SELECT nid FROM {node} WHERE type = :type", array(':type' => 'mx_product'));
	foreach ($result as $nid) {
		$nids[] = $nid;
	}
	node_delete_multiple($nids);

	foreach (array_keys(_mx_product_field_definitions()) as $field_name) {
		field_delete_field($field_name);
	}

	foreach (field_info_instances('node', 'mx_product') as $instance_name => $instance) {
		field_delete_instance($instance);
	}

	node_type_delete('mx_product');

	field_purge_batch(1000);

}


/**
 * Gibt ein strukturiertes Array mit Fielddefinitionen für den Inhaltstyp "MX Product" zurück.
 * @return array
 */
function _mx_product_field_definitions() {
	return array(
//		'mx_product_packshot' => array(
//			'field_name' => 'mx_product_packshot',
//			'type' => 'image',
//			'locked' => true,
//		),
		'mx_product_country' => array(
			'field_name' => 'mx_product_country',
			'type' => 'text',
			'locked' => true,
		),
	);
}

/**
 * Gibt ein strukturiertes Array mit Fieldinstances für den Inhaltstyp "MX Product" zurück.
 *  @return array
 */
function _mx_product_field_instances() {
	return array(
//		array(
//			'field_name' => 'mx_product_packshot',
//			'label' => 'Packshot für das Produkt',
//			'description' => 'Falls verfügbar, kann hier ein Packshot des Produktes hinterlegt werden.',
//			'settings' => array(
//				'file_directory' => 'mx_product/packshot',
//			),
//		),

		array(
			'field_name' => 'mx_product_country',
			'label' => 'Land',
			'description' => 'Land, für das das Produkt erstellt wurde.',
			'required' => true,
		),
	);
}

This code works without problems. Uncomment the image field definition and you have this problem during uninstall.

sun’s picture

Category: bug » support
Priority: Major » Normal
Letharion’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

With 17 releases since this issue was opened, and no more activity, I'm guessing the problem has actually been solved one way or the other.