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 »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • postProcess hook problem
Pages: [1]

Author Topic: postProcess hook problem  (Read 4415 times)

dragontree

  • Guest
postProcess hook problem
October 23, 2009, 12:09:11 am
I cant get the postProcess to work for some reason.

If I understand it correctly it should be invoked when I submit a form. In my case, when I save an event (create or edit). Doesn't editing an event invoke this hook?

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: postProcess hook problem
October 23, 2009, 07:04:57 am

what is your module name and what is your postProcess function name

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

dragontree

  • Guest
Re: postProcess hook problem
October 24, 2009, 10:34:55 am
I used :
Code: [Select]
function joomla_civicrm_postProcess( $formName, &$form )
Dont know why it didn't work because the customFieldOptions hook works fine with the same naming:
Code: [Select]
function joomla_civicrm_customFieldOptions( $fieldID, &$options )
Finally I used the civicrm_custom hook which does almost the same thing in my situation. Although I would like to use the postProcess hook.

EDIT: I accidentally found out that the postProcess hook works fine when I edited a custom field (admin side of Civi), but still nothing when I edit event info.
« Last Edit: October 26, 2009, 02:21:16 am by dragontree »

dragontree

  • Guest
Re: postProcess hook problem
October 26, 2009, 08:24:36 am
It seems that the custom hook wont do the job so I still have to use the postProcess hook, so all help is welcome.

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: postProcess hook problem
October 26, 2009, 08:48:49 am

can u give us the url for which the postProcess hook does not fire

thanx

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

dragontree

  • Guest
Re: postProcess hook problem
October 26, 2009, 09:28:31 am
the url is:
http://t66andjad.innolabor.net/administrator/index2.php?option=com_civicrm&task=civicrm/admin/event&reset=1&action=update&id=29&subPage=EventInfo

if you need the username/password I can PM them to you.

jrkelley32

  • I post occasionally
  • **
  • Posts: 44
  • Karma: 0
Re: postProcess hook problem
October 27, 2009, 03:01:35 pm
Was there any resolution to this issue?  I just set this up and am having the same issue.

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: postProcess hook problem
October 27, 2009, 06:37:56 pm

can u please file an issue. I reproduced this in v3.0.1

We'll fix it for 3.0.2

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

jrkelley32

  • I post occasionally
  • **
  • Posts: 44
  • Karma: 0
Re: postProcess hook problem
October 27, 2009, 07:20:22 pm
I need to get this working or find a workaround, any pointers ?

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: postProcess hook problem
October 27, 2009, 08:12:52 pm

check:

http://issues.civicrm.org/jira/browse/CRM-5306

http://fisheye2.atlassian.com/browse/CiviCRM/branches/v3.0/CRM/Event/Form/ManageEvent.php?r1=23658&r2=24596

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

jrkelley32

  • I post occasionally
  • **
  • Posts: 44
  • Karma: 0
Re: postProcess hook problem
October 30, 2009, 08:19:48 am
lobo,

We're on version 2.2.0 and cannot upgrade at this point, I checked the links and they are for version 3, and the code in 2.2.0 appears to be very different.  Can you point me to the proper location to put the CRM_Utils_String::getClassName call?  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: postProcess hook problem
October 30, 2009, 09:32:46 am

i looked at the code for 2.2 and am pretty sure that the postProcess hook should be called for 2.2

can u check and see if the validate hook is being called for the same page?

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

jrkelley32

  • I post occasionally
  • **
  • Posts: 44
  • Karma: 0
Re: postProcess hook problem
October 30, 2009, 10:20:18 am
It does not appear to be.  I am testing these using a form post on a custom profile page, just to give some background.

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: postProcess hook problem
October 30, 2009, 10:27:30 am

might be best to chat with us on IRC (link at the top of each page)

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

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: postProcess hook problem
October 30, 2009, 10:38:12 am

what specific version of civicrm? note that civicrmHooks.php support for joomla came in a later release of 2.2.4 (most likely)

http://issues.civicrm.org/jira/browse/CRM-4528

if it is still not working, please add some debugging code in: CRM/Utils/Hook/Joomla.php function invoke

piggybacking on an exisitign forum thread is definitely not recommended. Please avoid doing so in future

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • postProcess hook problem

This forum was archived on 2017-11-26.