Closed BBGuy closed 10 years ago
After saving a New Asset
Notice: Undefined index: contributions in kendra_e_resolve_asset_rights() (line 153 of /private/var/www/kendra/hub_v2/htdocs/sites/all/modules/custom/kendra_e/kendra_e.module). Warning: Invalid argument supplied for foreach() in _kendra_e_resolve_asset_rights_percentage() (line 261 of /private/var/www/kendra/hub_v2/htdocs/sites/all/modules/custom/kendra_e/kendra_e.module).
On adding a new contribution, if saving without populating all required fields the associated asset gets a fatal error: EntityMetadataWrapperException: Unable to get the data property title as the parent data structure is not set. in EntityStructureWrapper->getPropertyValue() (line 438 of /private/var/www/kendra/hub_v2/htdocs/sites/all/modules/contrib/entity/includes/entity.wrapper.inc). This is likely to be a combination of two issues: 1) A rule gets triggered that results in the entity being saved before it is ready 2) We have some code that can't deal with a partially saved contributions
This is triggered by a rule link "Add contribution" and as a result (1) is unavoidable. so we need to be able to ignore this records and fix (2)
The error is originated in the _kendra_e_collect_asset_rights() function
The above commit fixed the Fatal error when saving a new contribution without populating all required fields but also fixes many of the other issues as was a conman problem. however we may have other issues when entities are deleted without their related records, will do my best to test.
Deleting an embedded track without deleting the contribution record and we get a fatal error: EntityMetadataWrapperException: Unable to get the data property title as the parent data structure is not set. in EntityStructureWrapper->getPropertyValue() (line 438 of /private/var/www/kendra/hub_v2/htdocs/sites/all/modules/contrib/entity/includes/entity.wrapper.inc).
The above is caused by the kendra_e_get_contribution_display()function
All workflow issues are now resolved.
Test
Bugs