Comments

Cauliflower’s picture

This patch should do it.

swentel’s picture

Status: Active » Needs work
+++ b/bundle_copy.moduleundefined
@@ -65,6 +65,21 @@ function bundle_copy_bundle_copy_info() {
+        'access arguments' => 'administer content types',

Should be 'administer field collections'.

+++ b/bundle_copy.moduleundefined
@@ -65,6 +65,21 @@ function bundle_copy_bundle_copy_info() {
+        'access arguments' => 'administer content types',

Same thing here.

I'll commit when that's ok :)

Cauliflower’s picture

Status: Needs work » Needs review
StatusFileSize
new1.42 KB

This patch has the correct access arguments.

liquidcms’s picture

Status: Needs review » Needs work

not sure if related but both before and after this patch i get this error on import:

Fatal error: Call to undefined method FieldCollectionItemEntity::__set_state() in E:\wamp\www\ctai\sites\all\modules\bundle_copy\bundle_copy.module(317) : eval()'d code on line 1085
\n

however i have also successfully imported node types with collections (even without this patch).

tinker’s picture

Think you have an error:

function _bc_copy_field_collection_item_save($bundle) {
  $entity = new EntityAPIController('field_collection_item');
  return $entity->save($data);

$data is not defined. Should it be $bundle?

daffodilsoftware’s picture

Assigned: Unassigned » daffodilsoftware
Status: Needs work » Needs review
StatusFileSize
new2.17 KB

I have created a patch please test it and provide your feedback.

daffodilsoftware’s picture

Hi Cauliflower
Have you tested my patch?
Please provide your feedback so that we can commit this in module

mossy2100’s picture

Status: Needs review » Needs work

I applied the patch, exported a CT with a field collection, then tried to import it (with some field names changed), and got this error:

Fatal error: Call to undefined method FieldCollectionItemEntity::__set_state() in /Users/shaun/Dropbox/Business/Clients/DAFF Biosecurity/sites/biointel.org/www/sites/all/modules/contrib/bundle_copy/bundle_copy.module(297) : eval()'d code on line 894

HTH
Shaun

hawkeye.twolf’s picture

Same here. Also note that your patch has whitespace errors.

liquidcms’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev

i get same error with 2.x-dev

Fatal error: Call to undefined method FieldCollectionItemEntity::__set_state() in E:\wamp\www\ctai\sites\all\modules\bundle_copy\bundle_copy.module(312) : eval()'d code on line 1544

liquidcms’s picture

and as a quick test i redid export but left out the FC. import then worked fine.

also, this was was 2.x-dev but also with the patch applied.

Anonymous’s picture

Assigned: daffodilsoftware »
Status: Needs work » Needs review
StatusFileSize
new4.4 KB

I also got the same error with the #6 patch.This patch should do it.

liquidcms’s picture

Status: Needs review » Needs work

with patch in #12 i still get:

Fatal error: Call to undefined method FieldCollectionItemEntity::__set_state() in E:\wamp\www\ctai\sites\all\modules\bundle_copy\bundle_copy.module(312) : eval()'d code on line 1139

Anonymous’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev
Status: Needs work » Needs review

Hi liquidcms,
This patch is with version 7.x-1.x-dev. I forgot to changed the version when I submit the patch.Hope this is the version mistake only.As the patch shows white space errors when I review the code of the module with Coder Module it also shows me white space errors.The white space errors are not due to the #12 patch .

liquidcms’s picture

are 2.x and 1.x that much different? i applied the patch to 2.x (cleanly) and my export/import test fails as noted above. Doubt it would work with 1.x unless changes are being done to 1.x that are not being done to 2.x (which would be bad).

Anonymous’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
StatusFileSize
new2.16 KB

Hi Liquidcms,
This patch do it for 7.x-2.x-dev branch.The 2.x branch is different from the 1.x branch as I saw it later. The 2.x branch had given the support of Cloning of Content types and Exporting and Importing of Commerce Entity Bundles.

daffodilsoftware’s picture

Status: Needs review » Fixed

#16 patch fixed.

Status: Fixed » Closed (fixed)

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

saniya’s picture

Version: 7.x-2.x-dev » 7.x-1.1
Status: Closed (fixed) » Active

Hi,
I am using 7.1. I tried to import content types exported from one install and got "Fatal error: Call to undefined method FieldCollectionItemEntity::__set_state() in /sites/all/modules/bundle_copy/bundle_copy.module(298) : eval()'d code on line 7903"

I have applied the patch in comment # 12 but didn't help. Can anyone suggest?

eminencehealthcare’s picture

#16 works for me. Thanks so much.

aaronbauman’s picture

Issue summary: View changes
Status: Active » Needs work

#16 does not add field collection to bundle_copy's implementation of hook_bundle_copy_info(), so it does not fulfill this request.

aaronbauman’s picture

Patch #3 worked to import, as long as I created field collection bundles with matching names prior to importing.

colan’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
Status: Needs work » Patch (to be ported)

If I understand the history correctly, the fix is in for 7.x-2.x (and it works), but we still need something for 7.x-1.x. I'm updating the status, but please correct it if I'm missing something here.

aangel’s picture

Assigned: » Unassigned

Patch #16 worked for me nicely.

ruuddrupal’s picture

Patch in comment #16 works for me too.

aangel’s picture

Status: Patch (to be ported) » Closed (outdated)