CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Error thrown during AJAX call causes ENTIRE Drupal page to be returned
Pages: 1 [2]

Author Topic: Error thrown during AJAX call causes ENTIRE Drupal page to be returned  (Read 2960 times)

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Error thrown during AJAX call causes ENTIRE Drupal page to be returned
June 07, 2012, 07:10:51 pm

yep

might want to trap and ensure that your global and/or session variables are set before they are used in the POST hook

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

jakecivi

  • I post frequently
  • ***
  • Posts: 140
  • Karma: 0
Re: Error thrown during AJAX call causes ENTIRE Drupal page to be returned
June 08, 2012, 09:15:53 am
Okay.  Now I'm having trouble getting a values from buildForm to postProcess.  The two calls for the same form happen on different page loads, so assigning a global variable in buildForm does not make it accessible to postProcess, nor does postProcess have access to the previous run's $_GET; a print_r($_GET) in postProcess yields the following:

Code: [Select]
Array
(
    [q] => civicrm/contribute/add
)

I could use buildForm to store the value in a hidden form element, but then this value is alterable by anyone who knows how to use FireBug.

How can I securely get a variable from one page load to the next?

Pages: 1 [2]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Error thrown during AJAX call causes ENTIRE Drupal page to be returned

This forum was archived on 2017-11-26.