Notice: Trying to get property of non-object in file_field_presave() (line 220 of /var/www/vhosts/staging/drupal7/modules/file/file.field.inc).
    Notice: Undefined property: stdClass::$uri in file_save() (line 570 of /var/www/vhosts/staging/drupal7/includes/file.inc).
    Notice: Trying to get property of non-object in file_field_presave() (line 220 of /var/www/vhosts/staging/drupal7/modules/file/file.field.inc).
    Notice: Undefined property: stdClass::$uri in file_save() (line 570 of /var/www/vhosts/staging/drupal7/includes/file.inc).
    PDOException: SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint "file_managed_uri_key" DETAIL: Key (uri)=() already exists.: INSERT INTO file_managed (filesize, status, timestamp, uuid) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3); Array ( ) in drupal_write_record() (line 7106 of /var/www/vhosts/staging/drupal7/includes/common.inc).

Happened while enabling a feature with content to be migrated. The entire features admin is now totally disabled an only shows these errors.

Comments

Jeffrey C.’s picture

Status: Active » Postponed (maintainer needs more info)

Can you please provide more information on how to reproduce this issue (like what kind of contents are in the exportable)?

jduhls’s picture

They are nodes with text and image fields.

jduhls’s picture

Also, the features admin are is NOT totally disabled as I said before and the content does import although some of it without any of the text or images. I'm currently trying "Node Export" instead to see if that works.

jduhls’s picture

Version: 7.x-1.x-dev » 7.x-1.0-alpha3
    Notice: Trying to get property of non-object in file_field_presave() (line 220 of /var/www/vhosts/staging/drupal7/modules/file/file.field.inc).
    Notice: Undefined property: stdClass::$uri in file_save() (line 570 of /var/www/vhosts/staging/drupal7/includes/file.inc).
    Notice: Trying to get property of non-object in file_field_presave() (line 220 of /var/www/vhosts/staging/drupal7/modules/file/file.field.inc).
    Notice: Undefined property: stdClass::$uri in file_save() (line 570 of /var/www/vhosts/staging/drupal7/includes/file.inc).
    PDOException: SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint "file_managed_uri_key" DETAIL: Key (uri)=() already exists.: INSERT INTO file_managed (filesize, status, timestamp, uuid) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3); Array ( ) in drupal_write_record() (line 7106 of /var/www/vhosts/staging/drupal7/includes/common.inc).

...importing about 60 nodes of 5 content types with text and uploaded image fileds. Also, I switched back to the non-dev release. PHP 5.3.x, Postgresql 9.x, Latest drupal as of today (7.20)

jduhls’s picture

1.) I export the feature
2.) Enable on staging/production site
3.) Content is imported but titles only
4.) "Revert" the feature
5.) Error appears. Some content bodies are imported. None of the image fields and their images are imported. I'll see if they're even in the export file.

I'll update when I have more info. Also, i switched from dev back to non-dev version of the module.

jduhls’s picture

Version: 7.x-1.0-alpha3 » 7.x-1.x-dev

Switched back to dev and tried patch here: http://drupal.org/node/1904946

Still getting same errors. Nodes with fields seem to only import their titles but nothing else comes over.

jduhls’s picture

Funny...Node Export delivers similar errors...maybe it will help:

http://drupal.org/node/1925082

holdmann’s picture

It occures if one file(image) was attached to several nodes.

I'm not sure is it a uuid bug or uuid features.