On a view of field collection items this modules fails to work :(

snippit 1:

Undefined index: label vbo_search_and_replace.module:53 [1.73 sec, 67.6 MB]                                                          [notice]

Fatal error: Cannot access empty property in /var/www/example.com/sites/all/modules/contrib/vbo_search_and_replace/vbo_search_and_replace.module on line 50
Drush command terminated abnormally due to an unrecoverable error.                                                                [error]
Error: Cannot access empty property in
/var/www/example.com/sites/all/modules/contrib/vbo_search_and_replace/vbo_search_and_replace.module, line 50 [1.74 sec, 67.61
MB]

A dump of the entity:

FieldCollectionItemEntity Object                                        [notice]
(
    [fieldInfo:protected] => 
    [hostEntity:protected] => 
    [hostEntityId:protected] => 
    [hostEntityRevisionId:protected] => 
    [hostEntityType:protected] => 
    [langcode:protected] => und
    [item_id] => 1
    [revision_id] => 1
    [field_name] => field_auteurs
    [default_revision] => 1
    [archived] => 0
    [entityType:protected] => field_collection_item
    [entityInfo:protected] => Array
        (
            [label] => Field collection item
            [label callback] => entity_class_label
            [uri callback] => entity_class_uri
            [entity class] => FieldCollectionItemEntity
            [controller class] => EntityAPIController
            [base table] => field_collection_item
            [revision table] => field_collection_item_revision
            [fieldable] => 1
            [redirect] => 
            [entity keys] => Array
                (
                    [id] => item_id
                    [revision] => revision_id
                    [bundle] => field_name
                )

            [module] => field_collection
            [view modes] => Array
                (
                    [full] => Array
                        (
                            [label] => Volledige inhoud
                            [custom settings] => 
                        )

                    [diff_standard] => Array
                        (
                            [label] => Revision comparison
                            [custom settings] => 
                        )

                    [token] => Array
                        (
                            [label] => Tokens
                            [custom settings] => 
                        )

                )

            [access callback] => field_collection_item_access
            [metadata controller class] =>
FieldCollectionItemMetadataController
            [bundles] => Array
                (
                    [field_auteurs] => Array
                        (
                            [label] => Field collection field_auteurs
                            [admin] => Array
                                (
                                    [path] =>
admin/structure/field-collections/%field_collection_field_name
                                    [real path] =>
admin/structure/field-collections/field-auteurs
                                    [bundle argument] => 3
                                    [access arguments] => Array
                                        (
                                            [0] => administer field
collections
                                        )

                                )

                            [rdf_mapping] => Array
                                (
                                )

                        )

                )

            [static cache] => 1
            [field cache] => 1
            [load hook] => field_collection_item_load
            [translation] => Array
                (
                )

            [schema_fields_sql] => Array
                (
                    [base table] => Array
                        (
                            [0] => item_id
                            [1] => revision_id
                            [2] => field_name
                            [3] => archived
`                        )

                    [revision table] => Array
                        (
                            [0] => revision_id
                            [1] => item_id
                        )

                )

            [token type] => field_collection_item
            [configuration] => 
        )

    [idKey:protected] => item_id
    [nameKey:protected] => item_id
    [statusKey:protected] => status
    [defaultLabel:protected] => 
    [field_auteursnaam] => Array
        (
            [und] => Array
                (
                    [0] => Array
                        (
                            [value] => Foo qux
                            [format] => plain_text
                            [safe_value] => <p>Foo qux</p>

                        )

                )

        )

    [field_auteursfunctie] => Array
        (
        )

    [field_auteursbio] => Array
        (
            [und] => Array
                (
                    [0] => Array
                        (
                            [value] => is foobar
                            [format] => filtered_html
                            [safe_value] => <p>is foobar</p>

                        )

                )

        )

    [field_auteursadres] => Array
        (
            [und] => Array
                (
                    [0] => Array
                        (
                            [value] => <a
href="mailto:foo@bar.blah?subject=Trouw_artikel">foo@bar.blah</a>
                            [format] => filtered_html
                            [safe_value] => <p><a
href="mailto:foo@bar.blah?subject=Trouw_artikel">foo@bar.blah</a></p>

                        )

                )

        )

    [rdf_mapping] => Array
        (
        )

)

Comments

helmo’s picture

Issue summary: View changes

After applying the patch from #1263674-4: Add bundle keys to entity_info snippit 1 changes to

Undefined property: FieldCollectionItemEntity::$title                   [notice]
vbo_search_and_replace.module:53 [1.22 sec, 64.39 MB]

and it continues with the error from snippit 2.

I also looked at #1281974: Missing bundle property on entity - related to translations ... but didn't help.

helmo’s picture

Title: Field collection issue » Field collection issue with Views Bulk Operations Search & Replace
Project: Views Bulk Operations Search & Replace » Field collection

I tested this today with the latest dev version of field_collection, unfortunately with no change behaviour.

I'm therefore shortly moving this issue over to the field_collection queue in the hopes of finding someone who can help this along.

clemens.tolboom’s picture

What is your drush command? Does this happens too when on the site itself?

clemens.tolboom’s picture

Issue summary: View changes
Related issues: +#2470727: We should save the entity

Snippet #2 removed from summary as it is caused by VBO search and replace #2470727: We should save the entity

clemens.tolboom’s picture

Project: Field collection » Views Bulk Operations Search & Replace
Related issues: +#2470765: Grab label from bundle

Snippet #1 removed from summary as it is caused by VBO search and replace #2470765: Grab label from bundle

As there are no issues left I move this issue over to VBO search and replace too.

helmo’s picture

Status: Active » Closed (duplicate)

Fixable by the patch in #2470777: Bundled issues

clemens.tolboom’s picture

Parent issue: » #2470777: Bundled issues