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) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.5 Release Testing »
  • [FIXED] Upgraded to 4.5 Beta4, JS API success callbacks no longer fired?
Pages: [1]

Author Topic: [FIXED] Upgraded to 4.5 Beta4, JS API success callbacks no longer fired?  (Read 368 times)

EranSch

  • I post occasionally
  • **
  • Posts: 40
  • Karma: 3
    • Personal Blog
  • CiviCRM version: 4.5.X
  • CMS version: 4.X
  • MySQL version: 5.5.X
  • PHP version: 5.5.X
[FIXED] Upgraded to 4.5 Beta4, JS API success callbacks no longer fired?
August 01, 2014, 06:42:55 am
I'm not sure how to assemble more detailed information regarding this issue but it seems as though API calls that were working as expected in 4.5 Beta1 no longer execute their success callbacks since upgrading. The API call itself works fine but nothing occurs afterwards-- here's an example of one of my calls.

Code: [Select]
CRM.api('Event', 'create', req, {
    success: function(data) {
        alert(data);
    }
});

I'm happy to provide more detailed information but I'm not sure where to get it :)
« Last Edit: August 16, 2014, 01:08:13 pm by Coleman Watts »

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Upgraded to 4.5 Beta4, JS API success callbacks no longer fired?
August 01, 2014, 06:47:05 am
More details would be good - check the console for any errors.
I just tried going to the public sandbox site and typed this into the console:
Code: [Select]
CRM.api('contact', 'get', {}, {success: function() {alert('hey')}})And got the expected "hey" alert on the screen.
Try asking your question on the new CiviCRM help site.

EranSch

  • I post occasionally
  • **
  • Posts: 40
  • Karma: 3
    • Personal Blog
  • CiviCRM version: 4.5.X
  • CMS version: 4.X
  • MySQL version: 5.5.X
  • PHP version: 5.5.X
Re: Upgraded to 4.5 Beta4, JS API success callbacks no longer fired?
August 01, 2014, 08:25:27 am
Hey Coleman.

Thanks for the response. Previously, I wasn't seeing any errors on the console but the issue still must have been something on my end as I am now no longer able to reproduce it.

Sheesh. Sorry to waste your time.

EranSch

  • I post occasionally
  • **
  • Posts: 40
  • Karma: 3
    • Personal Blog
  • CiviCRM version: 4.5.X
  • CMS version: 4.X
  • MySQL version: 5.5.X
  • PHP version: 5.5.X
Re: Upgraded to 4.5 Beta4, JS API success callbacks no longer fired?
August 01, 2014, 11:01:21 am
I see now that the issue had to do with a flawed _post hook that had been included in the site shortly after the upgrade. Resolving the issue with the hook restores the success callback on the JS API.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.5 Release Testing »
  • [FIXED] Upgraded to 4.5 Beta4, JS API success callbacks no longer fired?

This forum was archived on 2017-11-26.