Support from Acquia helps fund testing for Drupal Acquia logo

Comments

emattias’s picture

Status: Active » Needs review
FileSize
925 bytes

This patch avoids the notice.

I am not 100% sure that this is the correct way to fix this issue. The problem might be that Inline Entity Form (see issue referenced in issue description) creates an entity incorrectly (without ->uid property).

emattias’s picture

Title: Assuming that $entity->uid exists. Causing notice n using inline entity form » Assuming that $entity->uid exists. Causing notice when using inline entity form
Chris Matthews’s picture

Version: 7.x-1.5 » 7.x-1.x-dev
Status: Needs review » Needs work
Issue tags: +Needs reroll

The 4 year old patch to callbacks.inc does not apply to the latest entity 7.x-1.x-dev and (if still relevant) needs a reroll.

Checking patch modules/callbacks.inc...
error: while searching for:
function entity_metadata_user_access($op, $entity = NULL, $account = NULL, $entity_type) {
  $account = isset($account) ? $account : $GLOBALS['user'];
  // Grant access to the users own user account and to the anonymous one.
  if (isset($entity) && $op != 'delete' && (($entity->uid == $account->uid && $entity->uid) || (!$entity->uid && $op == 'view'))) {
    return TRUE;
  }
  if (user_access('administer users', $account) || user_access('access user profiles', $account) && $op == 'view' && $entity->status) {

error: patch failed: modules/callbacks.inc:706
error: modules/callbacks.inc: patch does not apply
Snehal Brahmbhatt’s picture

Status: Needs work » Needs review
FileSize
849 bytes

@Chris2, Kindly find my below patch with the updated version 7.x-1.x-dev, hope this will help you..

Thanks!..