1

This question is because of troubleshooting I've been doing on Why won't data entered into CiviCRM profile html snippet save? Loading a Profile makes otherwise malfunctioning embedded forms work, and I suspect something is happening on the server side to allow access/give permission to something.

So: how do I view what's happening with cookie data in CiviCRM on the server side? I've tried rgrep to search all files in the web directory for the cookie name, and have dumped the CiviCRM database and the Joomla database and searched for the cookie name. I can't think of anywhere else to look. Thanks for any pointers!

1

More debug titbits.

Your question sounds like you're looking for the submitted/missing value name in the codebase - this form field name is probably not mentioned in the codebase if it's a value configured in the DB, as the form will then be generated.

Also, this name (say "volunteer_reason") may have been "munged" to a degree thanks to HTML_QuickForm's naming form inputs (you might see "contact_1_volunteer-reason_1" or whatever).

The most frequent cause of these not being populated as expected is when there is a mismatch between the originating and resulting request URLs. For those purposes, http://www.example.org and https://www.example.org are not the same thing; neither are http://example.org and http://www.example.org

This comment almost makes it sound like you're hitting session initialization issues - and that including the iframe prevents this. Weird.

0

I suspect this answer isn't what you need, but it might help your understanding.

PHP has superglobals $_SESSION and $_REQUEST which CiviCRM is probably using to access that data.

  • $_REQUEST contains data from $_COOKIE, but generally CiviCRM doesn't refer directly to cookies; it tends to use $_SESSION for that, and $_REQUEST for submitted form variables.
  • $_SESSION is stored server-side, and
  • PHP handles the mapping internally to identify the right local session from supplied cookies (or other methods, in a pinch).
0

To view the cookie / session information on profile submission:

  • Read Debugging for developers and become familiar with how to view values when CiviCRM is processing the form submission.
  • Go back through your posted backtrace and find where the value that fails validation is first validated. (Looks like CRM_Core_DAO::composeQuery() from the backtrace posted in other question.)
  • Inspect the submitted / missing value before it's validated.
  • Debug from there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.