Not sure weather this issue belongs to the eva module or ubercart. the error directs to eva module but is generated when using ubercart.
The issue is created when a user adds an item to the ubercart checkout.
Im using profile2/ profile reg path to create custom registration pages that allow members to sign up for certain roles. Both roles and user system is based on a premium membership site, so the user must pay for access, after registration they are directed to the ubercart where they must complete payment to be assigned the role. Once the user is directed to the ubercart and adds the membership type to there cart this error is presented
Notice: Undefined variable: entity in _eva_extract_entity_from_build() (line 148 of /path-to-site/sites/all/modules/eva/eva.module).
That line relates to this function
function _eva_extract_entity_from_build($build) {
// EntityAPI often sticks stuff in here.
if (!empty($build['#entity'])) {
return $entity;
}
// Other entities stick them here!
elseif (!empty($build['#' . $build['#entity_type']])) {
return $build['#' . $build['#entity_type']];
}
// Some entities are naughty.
elseif ($build['#entity_type'] == 'user') {
return $build['#account'];
}
elseif ($build['#entity_type'] == 'taxonomy_term') {
return $build['#term'];
}
return FALSE;
}
Any help apprectiated
It’s a bug with the EVA module that was apparently fixed in their development branch last year. The line
return $entity;should bereturn $build['#entity'];.