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) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Delayed "Thank you. Your information has been saved."
Pages: [1]

Author Topic: Delayed "Thank you. Your information has been saved."  (Read 905 times)

ThePayIsLousy

  • Guest
Delayed "Thank you. Your information has been saved."
August 15, 2010, 09:29:24 pm
I Googled and checked the bug database before posting this...

I've exposed several CiviCRM profiles by providing direct links in the Drupal left nav bar.  In addition, each profile uses the "redirect" advanced setting to go to the Drupal Home page when the SAVE button is clicked.

Step 1: user clicks on a profile link and enters data.

Step 2: user clicks SAVE and is returned to the Home page.

Step 3: user clicks on a different profile link (or contribution page) to enter data.

Problem: at the top of the page, the info msg "Thank you.  Your information has been saved." is displayed.  I presume that's the msg that would have been displayed "in place" on the profile from step 1 had I not included the redirect.

That's a bug, right?  Some kind of notification flag is set and s/be cleared before the redirect?

The closest discussion I could find:
http://forum.civicrm.org/index.php?action=printpage;topic=7067.0

Thanks for any tips you can offer!  The msg is too confusing for my many unsophisticated users, and I'll have to hack the code if no one has a better idea.  If it's a bug, please let me know and I'll submit it.

ThePayIsLousy

  • Guest
Re: Delayed "Thank you. Your information has been saved."
August 16, 2010, 07:01:19 pm
I'm tight on time -- big deadline coming up!  So, instead of waiting for a response to my last post, I decided to hack edit.php (mentioned in the lobo post I provided above).

I commented out this line:

/* CRM_Core_Session::setStatus(ts('Thank you. Your information has been saved.')); */

Was that a good idea?  Seems to work.  Well, the msg isn't displayed and my data is saved, anyway.

I'm already using the postProcess hook to add a Last Modified timestamp when a profile form is used to edit data.  Instead of kludging edit.php to avoid setting the status as I did above, I wonder if it would be cleaner to reset the status in the postProcess hook code?  If that's a good idea, is this the way to do it?

CRM_Core_Session::setStatus(null);

Thanks!

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: Delayed "Thank you. Your information has been saved."
August 17, 2010, 05:17:29 am

in the postProcess hook, use:

Code: [Select]
CRM_Core_Session::setStatus(null, false);

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

ThePayIsLousy

  • Guest
Re: Delayed "Thank you. Your information has been saved."
August 17, 2010, 05:48:25 am
Thanks, lobo -- I gave it a try.  Unfortunately, now I get a blank info line (the info "i" and a blank highlighted bar).  Apparently, setStatus to a null msg is not the same as not setting the status in the first place?

However this turns out, I promise to document the final solution!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Delayed "Thank you. Your information has been saved."

This forum was archived on 2017-11-26.