Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7.11
-
Fix Version/s: 4.7.12
-
Component/s: CiviContribute
-
Labels:
-
Documentation Required?:None
-
Funding Source:Contributed Code
Description
I noticed during a drush upgrade:
Undefined property: CRM_Core_DAO::$is_for_organization [notice]
FourSeven.php:433
Undefined property: CRM_Core_DAO::$is_for_organization [notice]
FourSeven.php:433
Undefined property: CRM_Core_DAO::$is_for_organization [notice]
FourSeven.php:433
Undefined property: CRM_Core_DAO::$is_for_organization [notice]
FourSeven.php:433
Undefined property: CRM_Core_DAO::$is_for_organization [notice]
FourSeven.php:433
Undefined property: CRM_Core_DAO::$is_for_organization [notice]
FourSeven.php:433
Undefined property: CRM_Core_DAO::$is_for_organization [notice]
FourSeven.php:433
I took a closer look and realize that the is_for_organization field is not making it into the SELECT statement.
I compared our 4.6 table:
mysql> select is_for_organization, uj.id as join_id, uj.uf_group_id as uf_group_id
-> FROM civicrm_contribution_page cp
-> INNER JOIN civicrm_uf_join uj ON uj.entity_id = cp.id AND uj.module = 'OnBehalf';
---------------------------------------
is_for_organization | join_id | uf_group_id |
---------------------------------------
0 | 4020 | 42 |
0 | 4142 | 42 |
2 | 4223 | 112 |
1 | 4886 | 42 |
1 | 4911 | 42 |
2 | 5013 | 112 |
2 | 5014 | 112 |
---------------------------------------
7 rows in set (0.00 sec)
mysql>
With our upgraded table:
mysql> select * from civicrm_uf_join where module = 'on_behalf';
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
id | is_active | module | entity_table | entity_id | weight | uf_group_id | module_data |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
4020 | 1 | on_behalf | civicrm_contribution_page | 5 | 1 | 42 | {"on_behalf":{"is_for_organization":null,"default":
{"for_organization":"I am paying on behalf of an organization."}
}} |
4142 | 1 | on_behalf | civicrm_contribution_page | 7 | 1 | 42 | {"on_behalf":{"is_for_organization":null,"default":
{"for_organization":"I am paying on behalf of an organization."}
}} |
4223 | 1 | on_behalf | civicrm_contribution_page | 4 | 1 | 112 | {"on_behalf":{"is_for_organization":null,"default":
{"for_organization":"I am paying on behalf of an organization."}
}} |
4886 | 1 | on_behalf | civicrm_contribution_page | 13 | 1 | 42 | {"on_behalf":{"is_for_organization":null,"default":
{"for_organization":"I am contributing on behalf of an organization."}
}} |
4911 | 1 | on_behalf | civicrm_contribution_page | 1 | 1 | 42 | {"on_behalf":{"is_for_organization":null,"default":
{"for_organization":"I am contributing on behalf of an organization."}
}} |
5013 | 1 | on_behalf | civicrm_contribution_page | 15 | 1 | 112 | {"on_behalf":{"is_for_organization":null,"default":
{"for_organization":"I am contributing on behalf of an organization."}
}} |
5014 | 1 | on_behalf | civicrm_contribution_page | 14 | 1 | 112 | {"on_behalf":{"is_for_organization":null,"default":
{"for_organization":"I am contributing on behalf of an organization."}
}} |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7 rows in set (0.00 sec)
mysql>
And it appears that valid entries from 4.6 are coming through as NULL in 4.7.