FieldException: Attempt to create an instance of field og_membership_request on bundle og_membership_type_default that already has an instance of that field. in field_create_instance() (line 490 of /opt/development/test/modules/field/field.crud.inc).
dd

Files: 
CommentFileSizeAuthor
#5 1511894-og-uninstall-fields-5.patch1.62 KBAmitaibu
PASSED: [[SimpleTest]]: [MySQL] 875 pass(es).
[ View ]
Screenshot at 2012-04-02 13:17:43.png17.75 KBrogical

Comments

Version:7.x-2.0-alpha2» 7.x-2.x-dev
Status:Active» Postponed (maintainer needs more info)

Please try and report bugs only based on the -dev version.

I had the same problem, but since I'm not the tech guy, I'm gonna try to explain how I fixed it..

Basically I unintalled OG 7.x-2.0-alpha2 all modules, and then if trying to reinstall "OG" Module, it gave me this error.

I fixed it by going to "field_config_instance" and deleted 3 OG fields there:
og_membership_request
og_group_ref_other_groups
og_group_ref

So I guess the module uninstall didn't uninstall these from the mysql. Anyways if doing it manually, i was able to install OG successfully.

I had the same error. Thanks to ifish
fixed by explicitly running below mysql command

delete from field_config_instance where field_name like '%og_%';

fields should be cleaned during uninstallation.

Title:FieldException: Attempt to create an instance of field og_membership_requestDelete on OG fields on uninstall
Status:Postponed (maintainer needs more info)» Needs review
StatusFileSize
new1.62 KB
PASSED: [[SimpleTest]]: [MySQL] 875 pass(es).
[ View ]

I to had the same problem, but using the dev. I uninstalled to re-install it thinking it would fix a problem I was having (it did). Using TechNikh sql statement worked like a charm. Many thanks to TechNikh and ifish

Status:Needs review» Fixed

Committed #6

Status:Fixed» Closed (fixed)

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

Status:Closed (fixed)» Active

I would like to reopen this issue.

In the latest dev of 29 october 2012 the field instance of og membership is not deleted on uninstall. This gives on error message when you try to reinstall og module.

Let me know if you need more information.

grts

Frederic wbase

actions in the actions table aren't deleted also...

It seems that the code commited in #5 no longer works. I am getting the error posted by the OP on install, and the following on uninstall:

Notice: Undefined index: field_name in og_uninstall() (line 67 of sites/all/modules/contrib/og/og.install).
Notice: Undefined index: field_name in og_uninstall() (line 71 of sites/all/modules/contrib/og/og.install).

Thus, it appears fields arent being deleted on uninstall at all, which is causing issues on reinstalls as the install scripts don't check whether these fields exist already (it assumes the above field_delete_instance functions were called)

I can confirm that the bug is still present in latest dev

FieldException: Attempt to create an instance of field og_membership_request on bundle og_membership_type_default that already has an instance of that field. in field_create_instance() (line 490 of field.crud.inc).

it is present in the rc2 version too

Version:7.x-2.x-dev» 7.x-2.0-rc4

This is still broken

Thanks TechNikh

Its works for me....!

same error latest dev. #3 works for me

Issue summary:View changes

#3 works for me, too. @TechNikh, thanks!

I can also confirm, that fix mentioned in #3 still works on latest dev version. Also, you can safely use it for PostgreSQL installations.