[FreeForm] Patches
Posted: 17 January 2008 06:05 AM   [ Ignore ]
Jr. Member
RankRank
Total Posts:  37
Joined  2007-04-26

Please note, these are for version 2.5.2, these may have been fixed in recent versions - but if not, I hope you find them helpful.

Original Code
// -------------------------------------------
// ‘freeform_module_validate_end’ hook.
// - This allows developers to do more
// form validation.
//
if (isset($EXT->extensions[’freeform_module_validate_end’]))
{
$edata = $EXT->call_extension(’freeform_module_validate_end’, $errors);
if ($EXT->end_script === TRUE) return;
}

Corrected Code
// -------------------------------------------
// ‘freeform_module_validate_end’ hook.
// - This allows developers to do more
// form validation.
//
if (isset($EXT->extensions[’freeform_module_validate_end’]))
{
$errors = $EXT->call_extension(’freeform_module_validate_end’, $errors);
if ($EXT->end_script === TRUE) return;
}
//

Reason for correction:  Need to be able to throw error from the extension.

Original Code
// -------------------------------------------
// ‘freeform_module_insert_end’ hook.
// - This allows developers to do one last
// thing before Freeform submit is ended.
//
if (isset($EXT->extensions[’freeform_module_insert_end’]))
{
$edata = $EXT->call_extension(’freeform_module_insert_end’, $fields, $entry_id,msg);
if ($EXT->end_script === TRUE) return;
}
//

Correct Code
// -------------------------------------------
// ‘freeform_module_insert_end’ hook.
// - This allows developers to do one last
// thing before Freeform submit is ended.
//
if (isset($EXT->extensions[’freeform_module_insert_end’]))
{
$edata = $EXT->call_extension(’freeform_module_insert_end’, $fields, $this->entry_id);
if ($EXT->end_script === TRUE) return;
}

Reason for correction:  Need to get the valid entry ID from class variable, and the $msg variable had already been reset on line 1253

Profile
 
 
Posted: 17 January 2008 07:18 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3272
Joined  2006-10-18

Thank you very much for your contribution! smile

 Signature 
Profile
 
 
Posted: 06 February 2008 06:59 AM   [ Ignore ]   [ # 2 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3272
Joined  2006-10-18

The extension hook bugs have been corrected in the latest version of Freeform: Freeform 2.6.2

 Signature 
Profile
 
 
Posted: 16 February 2008 12:45 AM   [ Ignore ]   [ # 3 ]
Newbie
Rank
Total Posts:  1
Joined  2008-02-14

I just downloaded 2.6.3 and the bug is still in there, maybe it found it’s way back in?

Profile
 
 
Posted: 20 March 2008 08:00 AM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  13
Joined  2007-12-03

It is back in 2.6.4 as well.

Terry

Profile
 
 
Posted: 20 March 2008 09:01 AM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  701
Joined  2004-03-30

PieMan, At least we know that this time Mitchell is not to blame, it’s that other Solspace developer! ha ha

mk

 Signature 

Mitchell Kimbrough

Profile
 
 
Posted: 20 March 2008 09:09 AM   [ Ignore ]   [ # 6 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3272
Joined  2006-10-18

Haha LOL

 Signature 
Profile
 
 
Posted: 20 March 2008 09:30 AM   [ Ignore ]   [ # 7 ]
Administrator
Avatar
Rank
Total Posts:  17
Joined  2005-03-22

I know! That other developer sucks!

 Signature 
Profile