Community

Profile images disapear when users log in

Okay, so it appears we have run into a major issue! -and after 2 days of debugging trying to eliminate the problem this is all we can come up with...

When a registered user logs in "If they previously had what we call a Logo image (custom CCK field) uploaded to there profile" it now disappears and deletes itself from the server without explanation!

To any account type including the admin accounts.

Now here is what is really weird! If your log'd in as an administrator and upload an image to any profile "OTHER" than the administrators account the Logo appears for that account and stays for the time being "BUT" as soon as that particular user logs in they receive an error on log in, then the logo image in there profile disappears and the file is deleted from the server automatically!

This has been happening since Saturday, last known to work fine on Friday even tho we had updated some modules
jQuery_Update, colorbox and a couple others.. reguardless at this point we have already reverted to the previous versions of those modules in an attempt to eliminate them as the cause.. "Nope still a problem"

This is the error on login:

Notice: Trying to get property of non-object in include() (line 4 of /home5/themerch/public_html/community/atTheMerchandiser/sites/all/themes/theMerch/templates/page--user.tpl.php).
Warning: array_flip(): Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of /home5/themerch/public_html/community/atTheMerchandiser/includes/entity.inc).
Notice: Trying to get property of non-object in file_field_presave() (line 220 of /home5/themerch/public_html/community/atTheMerchandiser/modules/file/file.field.inc).
Notice: Undefined property: stdClass::$uri in file_save() (line 570 of /home5/themerch/public_html/community/atTheMerchandiser/includes/file.inc).
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'uri': INSERT INTO {file_managed} (filesize, status, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => 0 [:db_insert_placeholder_1] => 1 [:db_insert_placeholder_2] => 1360714943 ) in drupal_write_record() (line 7106 of /home5/themerch/public_html/community/atTheMerchandiser/includes/common.inc).

---------------------------------------------------------------

The Following Error Appears now on any page the image was prior to self deletion (it repeats for every image that was self deleted in any given view or page):

Warning: array_key_exists() expects parameter 2 to be array, null given in theme_image_formatter() (line 605 of /home5/themerch/public_html/community/atTheMerchandiser/modules/image/image.field.inc).

----------------------------------------------------------------

This error was given when we tried to uninstall the "Remember Me" Module:

Warning: array_flip(): Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of /home5/themerch/public_html/community/atTheMerchandiser/includes/entity.inc).
Notice: Trying to get property of non-object in file_field_presave() (line 220 of /home5/themerch/public_html/community/atTheMerchandiser/modules/file/file.field.inc).
Notice: Undefined property: stdClass::$uri in file_save() (line 570 of /home5/themerch/public_html/community/atTheMerchandiser/includes/file.inc).
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'uri': INSERT INTO {file_managed} (filesize, status, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => 0 [:db_insert_placeholder_1] => 1 [:db_insert_placeholder_2] => 1360710405 ) in drupal_write_record() (line 7106 of /home5/themerch/public_html/community/atTheMerchandiser/includes/common.inc).

------------------------------------------------------------------

Now any other image field we have in say our forums for forum topics or image fields in other content types work fine and don't self delete doesn't matter user type! This seams to only be affecting our profiles???

We tried deleting and re-creating that particular image field even changed it to file instead of image and it does the same exact thing.. Why is this happening???

As of Friday, the last day worked on before this happened everything was running mint no error, no issues even with updates in place.. Now Fubar!

If anyone has any idea what is happening here we would greatly appreciate the in-site!

Thank You in advance! I will check back often and update any changes...

-update-
PROBLEM SOLVED:
Turns out it was the latest version of smart_ip v1.9 causing the problem reverted to 1.8 no more issue

Note: I found another site that this happened to and I don't think they realize it yet! Unfortunately once the image deletes itself it is gone! Hopefully they had backup's because they appear to have lost over 3,700 images do to this same instance just google:
Warning: array_key_exists() expects parameter 2 to be array, null given in theme_image_formatter() (line 605 of /modules/image/image.field.inc).

and look for this site http://www.guardian.co.tt/ they have a section with 10 images per page each the same field type but had 370 plus pages - i kinda feel bad for them...
Especially if they don't have them backed up.. it's bad enough they would have to re-enter them!

We had just several user accounts that lost there logo image for the one field type! We caught it before to many users log'd in and accidentally wiped there logo's our site www.communityat.themerchandiser.net

Anyway, hope this saves someone else! I'm going to cross reference a post in issues for smart_ip

Comments

Experiment using fresh Drupal 7.19 setup

Please check http://drupal.org/node/1915862#comment-7060540.
Based on my experiment, it turns out there are no deletion happened at the Image uploaded in user profile.
I would like to ask, to do your own experiment in fresh Drupal 7.19 setup to double check.
Please feel free to reopen the http://drupal.org/node/1915862 issue and state the detailed steps if the issue encountered in fresh Drupal 7.19 setup. Thanks.

nobody click here