Nice to meet you. Does not the contribution care about DRUPALBeginner either?
and Is the contribution in Japanese also possible?

FEATURESモジュールで、エクスポートしたコンテンツタイプをインストール時に生成しているのですが、
Fealggroupの生成で以下のエラー(Duplicate insert)が確認されます。

Duplicate entry 'profile-group_profile_personal' for key 'PRIMARY' query: INSERT INTO content_group (group_type, type_n.........

fieldgroup_groupsで既に登録済のfieldgroupを除外している様ですので
因みに、次の様な修正を加えるとエラーは出ません。

[feaures.fieldgropu.inc]

function fieldgroup_features_rebuild($module) {
..........
$groups = fieldgroup_groups($type_name,FALSE,TRUE); ←
//$groups = fieldgroup_groups($type_name);
..........
}

動作に影響はありませんが
インストール時のDuplicate Errorを消したいのですが、
よろしくお願いします。

CommentFileSizeAuthor
#4 features-725132-4.patch1.19 KBq0rban

Comments

mrfelton’s picture

Category: support » bug

I get the same error (numerous times) when trying to enable by using features_install_modules a feature in an implementation of hook_update_N().

e.g.

WD php: Duplicate entry 'blog-group_statistics' for key 'PRIMARY'                                                                                                        [error]
query: INSERT INTO content_group (group_type, type_name, group_name, label, settings, weight) VALUES ('standard', 'blog', 'group_statistics', 'Statistics',
'a:2:{s:4:\"form\";a:2:{s:5:\"style\";s:8:\"fieldset\";s:11:\"description\";s:0:\"\";}s:7:\"display\";a:11:{s:11:\"description\";s:0:\"\";s:5:\"label\";s:5:\"above\";i:5;a:2:{s:6:\"format\";s:8:\"fieldset\";s:7:\"exclude\";i:0;}s:6:\"teaser\";a:2:{s:6:\"format\";s:8:\"fieldset\";s:7:\"exclude\";i:0;}s:4:\"full\";a:2:{s:6:\"format\";s:8:\"fieldset\";s:7:\"exclude\";i:0;}i:4;a:2:{s:6:\"format\";s:8:\"fieldset\";s:7:\"exclude\";i:0;}i:2;a:2:{s:6:\"format\";s:8:\"fieldset\";s:7:\"exclude\";i:0;}i:3;a:2:{s:6:\"format\";s:8:\"fieldset\";s:7:\"exclude\";i:0;}s:11:\"email_plain\";a:2:{s:6:\"format\";s:8:\"fieldset\";s:7:\"exclude\";i:0;}s:10:\"email_html\";a:2:{s:6:\"format\";s:8:\"fieldset\";s:7:\"exclude\";i:0;}s:5:\"token\";a:2:{s:6:\"format\";s:8:\"fieldset\";s:7:\"exclude\";i:0;}}}',
-6) in /home/tom/workspace/example/sites/example.com/modules/contrib/cck/modules/fieldgroup/fieldgroup.module on line 810.
q0rban’s picture

Assigned: Unassigned » q0rban

Hmm, I'm assuming this must be enabling the feature on the site in which it was created? I'll have to check that out.

mrfelton’s picture

Yes, that is correct. I'm getting these errors when enabling the feature on a site where the features components already exist (that could be the site the feature was created on - which it is in this case, but could also be the any other site which already has the content types defined, such as the site I intend to enable this feature on once it's complete.).

q0rban’s picture

Status: Active » Needs review
StatusFileSize
new1.19 KB

Hmm, I couldn't actually replicate this, but I can see how it might happen. Attached patch should fix it.

yhahn’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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