2

I am seeing a fatal could not find value for 'ct' error when some of my users try to save a new contact. The associated error log is the following:

 [debug] $backTrace = #0 /var/www/html/clcnsw/sites/all/modules/civicrm/CRM/Core/Error.php(385): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /var/www/html/clcnsw/sites/all/modules/civicrm/CRM/Utils/Request.php(121): CRM_Core_Error::fatal("Could not find valid value for ct")
#2 /var/www/html/clcnsw/sites/all/modules/civicrm/CRM/Contact/Form/Contact.php(165): CRM_Utils_Request::retrieve("ct", "String", Object(CRM_Contact_Form_Contact), TRUE, NULL, "REQUEST")
#3 /var/www/html/clcnsw/sites/all/modules/civicrm/CRM/Core/Form.php(590): CRM_Contact_Form_Contact->preProcess()
#4 /var/www/html/clcnsw/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php(129): CRM_Core_Form->buildForm()
#5 /var/www/html/clcnsw/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Contact_Form_Contact), "upload")
#6 /var/www/html/clcnsw/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Contact), "upload")
#7 /var/www/html/clcnsw/sites/all/modules/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("upload")
#8 /var/www/html/clcnsw/sites/all/modules/civicrm/CRM/Utils/Wrapper.php(114): CRM_Core_Controller->run()
#9 /var/www/html/clcnsw/sites/all/modules/civicrm/CRM/Core/Invoke.php(263): CRM_Utils_Wrapper->run("CRM_Contact_Form_Contact", "New Contact", (Array:1))
#10 /var/www/html/clcnsw/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:13))
#11 /var/www/html/clcnsw/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
#12 /var/www/html/clcnsw/sites/all/modules/civicrm/drupal/civicrm.module(444): CRM_Core_Invoke::invoke((Array:3))
#13 /var/www/html/clcnsw/includes/menu.inc(527): civicrm_invoke("contact", "add")
#14 /var/www/html/clcnsw/index.php(21): menu_execute_active_handler()
#15 {main}

I think this is just after the permissions check in civicrm/CRM/Contact/Form/Contact.php but beyond that I am not sure what is causing this.

The user is logged in, has appropriate permissions and can go back and try again, generally with success. However, work they were doing at the time is lost, which they are not happy about.

The only other clue I have is that some users have been accessing the system with a shared account - I suggested they not do this but the office admin wants all volunteers to log in with a shared "volunteer account" for data entry. It is usually this user that experiences this issue. Although to be fair they also do most new data entry.

I don't know if that could be causing this problem. If it is I would appreciate a good way to demonstrate this so I can convince my bosses this practice should be stopped.

9
  • Are they sucessfully saving one contact, then clicking the back button, overwriting with new info thinking they are making a new contact, then clicking save? That's what this sounds like to me.
    – Demerit
    Commented Nov 19, 2019 at 5:13
  • Make sure that the page which loads on the screen for adding a new contact has ct=Individual or ct=organization/household in the URL. Commented Nov 19, 2019 at 5:32
  • I haven't been able to reproduce the issue myself. It is happening to people doing data entry and they are sending me screenshots of the problem. It is not occurring on every new contact they create. @jitendra-fuzion are you saying I should check that is the page they are seeing or should I be ensuring that programatically somewhere?
    – tanbog
    Commented Nov 19, 2019 at 6:18
  • I think that the link they're using to create a contact is wrong and should have ct in the query string. Commented Nov 19, 2019 at 10:58
  • @jitendra-fuzion and how would I even fix that? As far as I am aware the users are clicking the "save" button to save the new contact. Does that mean there is a problem with how Civicrm is generating the link?
    – tanbog
    Commented Nov 20, 2019 at 3:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.