CiviCRM Asked by ajasper on December 30, 2021
When clicking on "manage case" in the case tab of any contact, I get the error message "getFieldValue failed". I can use all other parts of CiviCase, but don’t see a possibility to set the case status, assign case coordinators or such.
This is a rather fresh WordPress-CiviCRM 5.26.2. The organize case – functionality was never tested on this install. It might have been broken on install already, or might have come in place through settings during setup.
I couldn’t find out which FieldValue throws the error. Any hints where to look or even plain solutions?
The Log Entry doesn’t mention CiviCase at all, rather points at Core.
Log Entry:
[debug] $backTrace = #0 /var/www/wordpress_solocal_energy/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(419): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /var/www/wordpress_solocal_energy/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(39): CRM_Core_Error::handleUnhandledException(Object(CRM_Core_Exception))
#2 /var/www/wordpress_solocal_energy/wp-content/plugins/civicrm/civicrm.php(1535): CRM_Core_Invoke::invoke((Array:4))
#3 /var/www/wordpress_solocal_energy/wp-includes/class-wp-hook.php(287): CiviCRM_For_WordPress->invoke("")
#4 /var/www/wordpress_solocal_energy/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters("", (Array:1))
#5 /var/www/wordpress_solocal_energy/wp-includes/plugin.php(478): WP_Hook->do_action((Array:1))
#6 /var/www/wordpress_solocal_energy/wp-admin/admin.php(254): do_action("toplevel_page_CiviCRM")
#7 {main}
The error message via mail reads (just the beginning of the message):
***ERROR***
message: getFieldValue failed
code:
exception: CRM_Core_Exception Object
(
[errorData:CRM_Core_Exception:private] => Array
(
[error_code] => 0
)
[cause:protected] =>
[_trace:PEAR_Exception:private] =>
[message:protected] => getFieldValue failed
[string:Exception:private] =>
[code:protected] => 0
[file:protected] => /var/www/wordpress_solocal_energy/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php
[line:protected] => 1252
[trace:Exception:private] => Array
DAO.php line 1252 (throw new…) is preceded by a comment in the code:
public static function getFieldValue($daoName, $searchValue, $returnColumn = 'name', $searchColumn = 'id', $force = FALSE) {
if (
empty($searchValue) ||
trim(strtolower($searchValue)) == 'null'
) {
// adding this here since developers forget to check for an id
// or for the 'null' (which is a bad DAO kludge)
// and hence we get the first value in the db
throw new CRM_Core_Exception('getFieldValue failed');
}
full Log Entry (I had to delete the last 2,500 characters due to the maximum post length of 30,000 characters):
[error]
$Fatal Error Details = array(3) {
["message"]=>
string(20) "getFieldValue failed"
["code"]=>
NULL
["exception"]=>
object(CRM_Core_Exception)#15747 (10) {
["errorData":"CRM_Core_Exception":private]=>
array(1) {
["error_code"]=>
int(0)
}
["cause":protected]=>
NULL
["_trace":"PEAR_Exception":private]=>
NULL
["message":protected]=>
string(20) "getFieldValue failed"
["string":"Exception":private]=>
string(0) ""
["code":protected]=>
int(0)
["file":protected]=>
string(85) "/var/www/wordpress_solocal_energy/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php"
["line":protected]=>
int(1252)
["trace":"Exception":private]=>
array(14) {
[0]=>
array(6) {
["file"]=>
string(103) "/var/www/wordpress_solocal_energy/wp-content/plugins/civicrm/civicrm/CRM/Activity/Selector/Activity.php"
["line"]=>
int(133)
["function"]=>
string(13) "getFieldValue"
["class"]=>
string(12) "CRM_Core_DAO"
["type"]=>
string(2) "::"
["args"]=>
array(4) {
[0]=>
string(32) "CRM_Event_BAO_ParticipantPayment"
[1]=>
NULL
[2]=>
string(14) "participant_id"
[3]=>
string(15) "contribution_id"
}
}
[1]=>
array(6) {
["file"]=>
string(103) "/var/www/wordpress_solocal_energy/wp-content/plugins/civicrm/civicrm/CRM/Activity/Selector/Activity.php"
["line"]=>
int(425)
["function"]=>
string(11) "actionLinks"
["class"]=>
string(30) "CRM_Activity_Selector_Activity"
["type"]=>
string(2) "::"
["args"]=>
array(5) {
[0]=>
string(2) "46"
[1]=>
NULL
[2]=>
bool(false)
[3]=>
string(3) "126"
[4]=>
NULL
}
}
[2]=>
array(6) {
["file"]=>
string(101) "/var/www/wordpress_solocal_energy/wp-content/plugins/civicrm/civicrm/CRM/Core/Selector/Controller.php"
["line"]=>
int(404)
["function"]=>
string(7) "getRows"
["class"]=>
string(30) "CRM_Activity_Selector_Activity"
["type"]=>
string(2) "->"
["args"]=>
array(6) {
[0]=>
int(4)
[1]=>
int(0)
[2]=>
int(50)
[3]=>
object(CRM_Utils_Sort)#15794 (7) {
["_name":protected]=>
NULL
["_vars"]=>
array(5) {
[2]=>
array(3) {
["name"]=>
string(13) "activity_type"
["direction"]=>
int(4)
["title"]=>
string(3) "Typ"
}
[3]=>
array(3) {
["name"]=>
string(7) "subject"
["direction"]=>
int(4)
["title"]=>
string(14) "Thema, Betreff"
}
[4]=>
array(3) {
["name"]=>
string(19) "source_contact_name"
["direction"]=>
int(4)
["title"]=>
string(16) "Hinzugefügt von"
}
[5]=>
array(3) {
["name"]=>
string(18) "activity_date_time"
["direction"]=>
int(4)
["title"]=>
string(5) "Datum"
}
[6]=>
array(3) {
["name"]=>
string(9) "status_id"
["direction"]=>
int(4)
["title"]=>
string(6) "Status"
}
}
["_link":protected]=>
string(245) "/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcontact%2Fview%2Fcase&page=CiviCRM&reset=1&id=5&cid=50&action=view&context=case&selectedChild=case&key=0c9e913e0fc67c8f00c1438c5692e3d7_6103&force=1&crmSID="
["_urlVar":protected]=>
string(6) "crmSID"
["_currentSortID":protected]=>
int(1)
["_currentSortDirection":protected]=>
NULL
["_response"]=>
array(5) {
["activity_type"]=>
array(1) {
["link"]=>
string(282) "Typ"
}
["subject"]=>
array(1) {
["link"]=>
string(293) "Thema, Betreff"
}
["source_contact_name"]=>
array(1) {
["link"]=>
string(295) "Hinzugefügt von"
}
["activity_date_time"]=>
array(1) {
["link"]=>
string(284) "Datum"
}
["status_id"]=>
array(1) {
["link"]=>
string(285) "Status"
}
}
}
[4]=>
int(1)
[5]=>
int(5)
}
}
[3]=>
array(6) {
["file"]=>
string(101) "/var/www/wordpress_solocal_energy/wp-content/plugins/civicrm/civicrm/CRM/Core/Selector/Controller.php"
["line"]=>
int(326)
["function"]=>
string(7) "getRows"
["class"]=>
string(28) "CRM_Core_Selector_Controller"
["type"]=>
string(2) "->"
["args"]=>
array(1) {
[0]=>
object(CRM_Core_Selector_Controller)#15563 (18) {
["_object":protected]=>
object(CRM_Activity_Selector_Activity)#15778 (8) {
["_contactId":protected]=>
int(50)
["_admin":protected]=>
bool(false)
["_context":protected]=>
string(4) "case"
["_activityTypeIDs":protected]=>
NULL
["_viewOptions":protected]=>
array(13) {
["activity"]=>
int(1)
["rel"]=>
int(1)
["group"]=>
int(1)
["note"]=>
int(1)
["tag"]=>
int(1)
["log"]=>
int(1)
["CiviContribute (Zuwendungen)"]=>
int(1)
["CiviMember (Mitgliederverwaltung)"]=>
int(1)
["CiviEvent"]=>
int(1)
["CiviCase (Fallmanagement)"]=>
int(1)
["CiviGrant (Bewilligungen)"]=>
int(0)
["CiviPledge (Unterstützungszusagen)"]=>
int(1)
["CiviMail"]=>
int(1)
}
["_order":protected]=>
&array(5) {
[2]=>
&array(3) {
["name"]=>
string(3) "Typ"
["sort"]=>
string(13) "activity_type"
["direction"]=>
int(4)
}
[3]=>
&array(3) {
["name"]=>
string(14) "Thema, Betreff"
["sort"]=>
string(7) "subject"
["direction"]=>
int(4)
}
[4]=>
&array(3) {
["name"]=>
string(16) "Hinzugefügt von"
["sort"]=>
string(19) "source_contact_name"
["direction"]=>
int(4)
}
[5]=>
&array(3) {
["name"]=>
string(5) "Datum"
["sort"]=>
string(18) "activity_date_time"
["direction"]=>
int(4)
}
[6]=>
&array(3) {
["name"]=>
string(6) "Status"
["sort"]=>
string(9) "status_id"
["direction"]=>
int(4)
}
}
["_permission":protected]=>
NULL
["_key":protected]=>
NULL
}
["_sort":protected]=>
object(CRM_Utils_Sort)#15794 (7) {
["_name":protected]=>
NULL
["_vars"]=>
array(5) {
[2]=>
array(3) {
["name"]=>
string(13) "activity_type"
["direction"]=>
int(4)
["title"]=>
string(3) "Typ"
}
[3]=>
array(3) {
["name"]=>
string(7) "subject"
["direction"]=>
int(4)
["title"]=>
string(14) "Thema, Betreff"
}
[4]=>
array(3) {
["name"]=>
string(19) "source_contact_name"
["direction"]=>
int(4)
["title"]=>
string(16) "Hinzugefügt von"
}
[5]=>
array(3) {
["name"]=>
string(18) "activity_date_time"
["direction"]=>
int(4)
["title"]=>
string(5) "Datum"
}
[6]=>
array(3) {
["name"]=>
string(9) "status_id"
["direction"]=>
int(4)
["title"]=>
string(6) "Status"
}
}
["_link":protected]=>
string(245) "/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcontact%2Fview%2Fcase&page=CiviCRM&reset=1&id=5&cid=50&action=view&context=case&selectedChild=case&key=0c9e913e0fc67c8f00c1438c5692e3d7_6103&force=1&crmSID="
["_urlVar":protected]=>
string(6) "crmSID"
["_currentSortID":protected]=>
int(1)
["_currentSortDirection":protected]=>
NULL
["_response"]=>
array(5) {
["activity_type"]=>
array(1) {
["link"]=>
string(282) "Typ"
}
["subject"]=>
array(1) {
["link"]=>
string(293) "Thema, Betreff"
}
["source_contact_name"]=>
array(1) {
["link"]=>
string(295) "Hinzugefügt von"
}
["activity_date_time"]=>
array(1) {
["link"]=>
string(284) "Datum"
}
["status_id"]=>
array(1) {
["link"]=>
string(285) "Status"
}
}
}
["_sortID":protected]=>
NULL
["_sortOrder":protected]=>
&array(5) {
[2]=>
&array(3) {
["name"]=>
string(3) "Typ"
["sort"]=>
string(13) "activity_type"
["direction"]=>
int(4)
}
[3]=>
&array(3) {
["name"]=>
string(14) "Thema, Betreff"
["sort"]=>
string(7) "subject"
["direction"]=>
int(4)
}
[4]=>
&array(3) {
["name"]=>
string(16) "Hinzugefügt von"
["sort"]=>
string(19) "source_contact_name"
["direction"]=>
int(4)
}
[5]=>
&array(3) {
["name"]=>
string(5) "Datum"
["sort"]=>
string(18) "activity_date_time"
["direction"]=>
int(4)
}
[6]=>
&array(3) {
["name"]=>
string(6) "Status"
["sort"]=>
string(9) "status_id"
["direction"]=>
int(4)
}
}
["_pager":protected]=>
object(CRM_Utils_Pager)#15774 (64) {
["_response"]=>
array(13) {
["first"]=>
string(0) ""
["back"]=>
string(0) ""
["next"]=>
string(0) ""
["last"]=>
string(0) ""
["currentPage"]=>
int(1)
["numPages"]=>
int(1)
["csvString"]=>
NULL
["status"]=>
string(26) "Aktivitäten 1 - 24 von 24"
["buttonTop"]=>
string(14) "PagerTopButton"
["buttonBottom"]=>
string(17) "PagerBottomButton"
["currentLocation"]=>
string(194) "/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcontact%2Fview%2Fcase&page=CiviCRM&id=5&cid=50&action=view&context=case&selectedChild=case&key=0c9e913e0fc67c8f00c1438c5692e3d7_6103&force=1&crmPID=1"
["titleTop"]=>
string(80) "Seite von 1"
["titleBottom"]=>
string(82) "Seite von 1"
}
["_totalItems"]=>
int(24)
["_perPage"]=>
int(50)
["_delta"]=>
int(1)
["_currentPage"]=>
int(1)
["_totalPages"]=>
float(1)
["_linkClass"]=>
string(0) ""
["_classString"]=>
string(0) ""
["_path"]=>
string(9) "/wp-admin"
["_fileName"]=>
string(9) "admin.php"
["_fixFileName"]=>
bool(true)
["_append"]=>
bool(true)
["_httpMethod"]=>
string(3) "GET"
["_formID"]=>
string(0) ""
["_importQuery"]=>
bool(true)
["_urlVar"]=>
string(6) "crmPID"
["_linkData"]=>
array(10) {
["page"]=>
string(7) "CiviCRM"
["q"]=>
string(25) "civicrm/contact/view/case"
["id"]=>
string(1) "5"
["cid"]=>
string(2) "50"
["action"]=>
string(4) "view"
["context"]=>
string(4) "case"
["selectedChild"]=>
string(4) "case"
["key"]=>
string(37) "0c9e913e0fc67c8f00c1438c5692e3d7_6103"
["noheader"]=>
bool(true)
["force"]=>
string(1) "1"
}
["_extraVars"]=>
array(1) {
["force"]=>
string(1) "1"
}
["_excludeVars"]=>
array(3) {
[0]=>
string(5) "reset"
[1]=>
string(7) "snippet"
[2]=>
string(7) "section"
}
["_expanded"]=>
bool(true)
["_accesskey"]=>
bool(false)
["_attributes"]=>
string(0) ""
["_onclick"]=>
string(0) ""
["_altFirst"]=>
string(10) "first page"
["_altPrev"]=>
string(13) "previous page"
["_altNext"]=>
string(9) "next page"
["_altLast"]=>
string(9) "last page"
["_altPage"]=>
string(7) "page %d"
["_prevImg"]=>
string(17) " < Vorheriger"
["_prevImgEmpty"]=>
NULL
["_nextImg"]=>
string(15) "Nächster > "
["_nextImgEmpty"]=>
NULL
["_separator"]=>
string(0) ""
["_spacesBeforeSeparator"]=>
int(1)
["_spacesAfterSeparator"]=>
int(1)
["_curPageLinkClassName"]=>
string(0) ""
["_curPageSpanPre"]=>
string(3) ""
["_curPageSpanPost"]=>
string(4) ""
["_firstPagePre"]=>
string(0) ""
["_firstPageText"]=>
string(17) " << Erster"
["_firstPagePost"]=>
string(0) ""
["_lastPagePre"]=>
string(0) ""
["_lastPageText"]=>
string(18) "Letzter >> "
["_lastPagePost"]=>
string(0) ""
["_spacesBefore"]=>
string(6) " "
["_spacesAfter"]=>
string(6) " "
["_firstLinkTitle"]=>
string(10) "first page"
["_nextLinkTitle"]=>
string(9) "next page"
["_prevLinkTitle"]=>
string(13) "previous page"
["_lastLinkTitle"]=>
string(9) "last page"
["_showAllText"]=>
string(0) ""
["_itemData"]=>
NULL
["_clearIfVoid"]=>
bool(true)
["_useSessions"]=>
bool(false)
["_closeSession"]=>
bool(false)
["_sessionVar"]=>
string(10) "setPerPage"
["_pearErrorMode"]=>
NULL
["links"]=>
string(0) ""
["linkTags"]=>
string(0) ""
["linkTagsRaw"]=>
array(4) {
["first"]=>
array(0) {
}
["prev"]=>
array(0) {
}
["next"]=>
array(0) {
}
["last"]=>
array(0) {
}
}
["range"]=>
array(0) {
}
["_allowed_options"]=>
array(51) {
[0]=>
string(10) "totalItems"
[1]=>
string(7) "perPage"
[2]=>
string(5) "delta"
[3]=>
string(9) "linkClass"
[4]=>
string(4) "path"
[5]=>
string(8) "fileName"
[6]=>
string(11) "fixFileName"
[7]=>
string(6) "append"
[8]=>
string(10) "httpMethod"
[9]=>
string(6) "formID"
[10]=>
string(11) "importQuery"
[11]=>
string(6) "urlVar"
[12]=>
string(8) "altFirst"
[13]=>
string(7) "altPrev"
[14]=>
string(7) "altNext"
[15]=>
string(7) "altLast"
[16]=>
string(7) "altPage"
[17]=>
string(7) "prevImg"
[18]=>
string(12) "prevImgEmpty"
[19]=>
string(7) "nextImg"
[20]=>
string(12) "nextImgEmpty"
[21]=>
string(8) "expanded"
[22]=>
string(9) "accesskey"
[23]=>
string(10) "attributes"
[24]=>
string(7) "onclick"
[25]=>
string(9) "separator"
[26]=>
string(21) "spacesBeforeSeparator"
[27]=>
string(20) "spacesAfterSeparator"
[28]=>
string(20) "curPageLinkClassName"
[29]=>
string(14) "curPageSpanPre"
[30]=>
string(15) "curPageSpanPost"
[31]=>
string(12) "firstPagePre"
[32]=>
string(13) "firstPageText"
[33]=>
string(13) "firstPagePost"
[34]=>
string(11) "lastPagePre"
[35]=>
string(12) "lastPageText"
[36]=>
string(12) "lastPagePost"
[37]=>
string(14) "firstLinkTitle"
[38]=>
string(13) "nextLinkTitle"
[39]=>
string(13) "prevLinkTitle"
[40]=>
string(13) "lastLinkTitle"
[41]=>
string(11) "showAllText"
[42]=>
string(8) "itemData"
[43]=>
string(11) "clearIfVoid"
[44]=>
string(11) "useSessions"
[45]=>
string(12) "closeSession"
[46]=>
string(10) "sessionVar"
[47]=>
string(13) "pearErrorMode"
[48]=>
string(9) "extraVars"
[49]=>
string(11) "excludeVars"
[50]=>
string(11) "currentPage"
}
["_url"]=>
string(19) "/wp-admin/admin.php"
["_pageData"]=>
array(0) {
}
}
["_pageID":protected]=>
int(1)
["_pagerOffset":protected]=>
int(0)
["_pagerRowCount":protected]=>
int(50)
["_total":protected]=>
int(24)
["_action":protected]=>
int(4)
["_content":protected]=>
NULL
["_embedded":protected]=>
bool(true)
["_print":protected]=>
bool(false)
["_store":protected]=>
object(CRM_Case_Page_Tab)#15483 (13) {
["_permission"]=>
NULL
["_contactId"]=>
int(50)
["_name":protected]=>
string(17) "CRM_Case_Page_Tab"
["_title":protected]=>
string(4) "Fall"
["_mode":protected]=>
string(4) "null"
["_embedded":protected]=>
bool(false)
["_print":protected]=>
bool(false)
["ajaxResponse"]=>
array(0) {
}
["urlPath"]=>
array(4) {
[0]=>
string(7) "civicrm"
[1]=>
string(7) "contact"
[2]=>
string(4) "view"
[3]=>
string(4) "case"
}
["useLivePageJS"]=>
NULL
["_action"]=>
int(4)
["_id"]=>
int(5)
["_context"]=>
string(4) "case"
}
["_output":protected]=>
int(1)
["_prefix":protected]=>
NULL
["_dynamicAction":protected]=>
bool(false)
["_case"]=>
int(5)
}
}
}
[4]=>
array(6) {
["file"]=>
string(90) "/var/www/wordpress_solocal_energy/wp-content/plugins/civicrm/civicrm/CRM/Case/Page/Tab.php"
["line"]=>
int(111)
["function"]=>
string(3) "run"
["class"]=>
string(28) "CRM_Core_Selector_Controller"
["type"]=>
string(2) "->"
["args"]=>
array(0) {
}
}
[5]=>
array(6) {
["file"]=>
string(90) "/var/www/wordpress_solocal_energy/wp-content/plugins/civicrm/civicrm/CRM/Case/Page/Tab.php"
["line"]=>
int(180)
["function"]=>
string(4) "view"
["class"]=>
string(17) "CRM_Case_Page_Tab"
["type"]=>
string(2) "->"
["args"]=>
array(0) {
}
}
[6]=>
array(6) {
["file"]=>
string(88) "/var/www/wordpress_solocal_energy/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php"
["line"]=>
int(312)
["function"]=>
string(3) "run"
["class"]=>
string(17) "CRM_Case_Page_Tab"
["type"]=>
string(2) "->"
["args"]=>
array(2) {
[0]=>
array(4) {
[0]=>
string(7) "civicrm"
[1]=>
string(7) "contact"
[2]=>
string(4) "view"
[3]=>
string(4) "case"
}
[1]=>
NULL
}
}
From your backtrace it looks like, you have a activity of type payment or refund that is suppose to have link to contribution in civicrm_activity.source_record_id which is unfortunately set as NULL.
Answered by Pradeep Nayak on December 30, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP