kendraio / kendra_hub

Kendra Hub
https://www.kendra.io/kendra-hub
GNU General Public License v2.0
4 stars 1 forks source link

Go through workflows and find bits that don’t work and fix #21

Closed BBGuy closed 10 years ago

BBGuy commented 10 years ago

Test

Bugs

BBGuy commented 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).

BBGuy commented 10 years ago

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)

BBGuy commented 10 years ago

The error is originated in the _kendra_e_collect_asset_rights() function

BBGuy commented 10 years ago

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.

BBGuy commented 10 years ago

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).

BBGuy commented 10 years ago

The above is caused by the kendra_e_get_contribution_display()function

BBGuy commented 10 years ago

All workflow issues are now resolved.