Extension hook problem
Posted: 06 February 2008 08:30 AM   [ Ignore ]
Newbie
Rank
Total Posts:  9
Joined  2007-06-04

Hi there. I’m using the freeform_module_insert_begin hook to send data to salesforce. I’ve set up the extension ok and data is being sent alright to Salesforce.

My problem is returning back from the extension. I am pretty new to extensions but understand that

$EXT->end_script = TRUE;

should return me after the code in my extension has finished processing.

If I add this to end of the function I’m calling I get

Warning: Invalid argument supplied for foreach() in /...snip.../db/db.mysql.php on line 698

Warning: Cannot modify header information - headers already sent by (output started at /...snip.../db/db.mysql.php:698) in /..snip..core/core.functions.php on line 296

Have I completely misunderstood how this should work? I’ve read through the docs and thought $EXT->end_script = TRUE; would do the trick.

Profile
 
 
Posted: 06 February 2008 09:04 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3272
Joined  2006-10-18

Which versions of Freeform and ExpressionEngine are you using?

If you are using EE 1.6.1+ or Freeform 2.6.1 or less, there were some extension hook bugs that have been corrected in the latest version of Freeform: Freeform 2.6.2

 Signature 
Profile
 
 
Posted: 06 February 2008 09:21 AM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  9
Joined  2007-06-04

Thanks Pie Man!

I updated from 2.6.1 to 2.6.2 and EE 1.6.2 but still get the error. I see in the source that compatibility is 1.6.1 - should I roll back to 1.6.1?

Offending extension is attached if that helps.

File Attachments
ext.freeform_module_insert_begin.php.zip  (File Size: 2KB - Downloads: 26)
Profile
 
 
Posted: 06 February 2008 09:24 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3272
Joined  2006-10-18

I wouldn’t LOL

Did this script extension hook ever work for you? Or is this the first time trying it?

 Signature 
Profile
 
 
Posted: 06 February 2008 09:29 AM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  9
Joined  2007-06-04

First time I’ve tried it! It takes over ok and runs the script fine - I just can’t get back to the Freeform processing!

Profile