Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 1.5
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
If a contribution record has premium information, it will not show up on the search result page. This can be reproduced very easily on the sandbox.
It seems like the problem is with the name field. Both 'contribution type' and the 'product name' fields are named 'name' in the database. The query function is confused as to which 'name' to use.
The DAO code is actually correct in mapping the product's 'name' field to 'product_name'. The problem is with the BAO code. In particular, two files need to be changed:
CRM/Contribute/Selector/Search.php
In the static $_properties array, change 'name' to 'product_name'
CRM/Contribute/BAO/Query.php
Inside the defaultReturnProperties function, change the $properties array function to use 'product_name' instead of 'name'
That's pretty much all that's needed to fix this. The template is actually using the right field so no change is needed.