When I go to moderation page I get the following error (for one user who's new avatar is not approved):

  • Notice: Trying to get property of non-object in avatarapproval_admin_overview_form() (line 329 of /home/gallery/public_html/sites/all/modules/avatarapproval/avatarapproval.pages.inc).
  • Notice: Trying to get property of non-object in avatarapproval_admin_overview_form() (line 330 of /home/gallery/public_html/sites/all/modules/avatarapproval/avatarapproval.pages.inc).
  • Notice: Trying to get property of non-object in avatarapproval_admin_overview_form() (line 329 of /home/gallery/public_html/sites/all/modules/avatarapproval/avatarapproval.pages.inc).
  • Notice: Trying to get property of non-object in avatarapproval_admin_overview_form() (line 330 of /home/gallery/public_html/sites/all/modules/avatarapproval/avatarapproval.pages.inc).

After approving it I got more errors:

  • Notice: Trying to get property of non-object in avatarapproval_admin_overview_form() (line 329 of /home/gallery/public_html/sites/all/modules/avatarapproval/avatarapproval.pages.inc).
  • Notice: Trying to get property of non-object in avatarapproval_admin_overview_form() (line 330 of /home/gallery/public_html/sites/all/modules/avatarapproval/avatarapproval.pages.inc).
  • Notice: Trying to get property of non-object in avatarapproval_admin_overview_form() (line 329 of /home/gallery/public_html/sites/all/modules/avatarapproval/avatarapproval.pages.inc).
  • Notice: Trying to get property of non-object in avatarapproval_admin_overview_form() (line 330 of /home/gallery/public_html/sites/all/modules/avatarapproval/avatarapproval.pages.inc).
  • Notice: Trying to get property of non-object in avatarapproval_do_approval() (line 810 of /home/gallery/public_html/sites/all/modules/avatarapproval/avatarapproval.module).
  • Recoverable fatal error: Argument 1 passed to file_copy() must be an instance of stdClass, boolean given, called in /home/mangall/public_html/sites/all/modules/avatarapproval/avatarapproval.module on line 815 and defined in file_copy() (line 750 of /home/gallery/public_html/includes/file.inc).

followed by:
The website encountered an unexpected error. Please try again later.

And one point I like to have about the interface. There is no view of the avatar to be moderated. If the new photo is not seen, how can moderator approve or delete?

Comments

dexiecarla’s picture

StatusFileSize
new1.26 KB

Here's a patch, this might be a little late for you,
but this issue still exist.

dexiecarla’s picture

dexiecarla’s picture

StatusFileSize
new1.26 KB

above might not be approved, but this one has the correct comment number

prethiee’s picture

StatusFileSize
new832 bytes

patch file

prethiee’s picture

I have a similar problem.

prethiee’s picture

Issue tags: +Please review
Parent issue: » #2223485: Notice: line 329 avatarapproval.pages.inc

The avatars are getting removed from the moderation page as the images no longer exists in the file_managed table. Since the images are stored with the status->0[temp] in the file_managed table they are deleted during cron tasks as they aren't stored with the permanent status or when they are older than DRUPAL_MAXIMUM_TEMP_FILE_AGE seconds[usually 6 hours]. This thread could be helpful in explaining the scenario. The Notices are appearing as they are pointing to the file-objects that are no longer available. Storing the avatar with the file status permanent could resolve this issue, and I have made the patch available for the same.

prethiee’s picture

Issue tags: -Please review +Needs Review