Forums

Session Bug in 3.2

skidd 24 Jan, 2012
Hello,

I am really frustrated with a multi-form session bug. I have used the following code that I found from another solution on my Mother Form.


<?php
$formname = 'masterForm';
$session =& JFactory::getSession();
if ( $session->has('chrono_formpages_data_'.$formname, md5('chrono')) ) {
  $session->clear('chrono_formpages_data_'.$formname, md5('chrono'));
}
if ( $session->has('chrono_formpages_files_'.$formname, md5('chrono')) ) {
  $session->clear('chrono_formpages_files_'.$formname, md5('chrono'));
}
?>


Basically my posted array keeps showing me the old file names! Oh yeah, I also did a hack provided by GreyHead in my cf_multi_page.php:

	// insert the following three lines
      if ( count($MyUploads->attachments) ) {
         $newposted = array_merge($newposted, $MyUploads->attachments);
      }
      // end insert


Here is a link to my page http://www.capturingtrueemotion.com/index.php?option=com_chronocontact&chronoformname=masterForm

it just keeps showing me the file names from the last session which means I can't finish up the form.

I am going to PM my user/pass, thank you as always!

GreyHead is the best!
Max_admin 29 Jan, 2012
Hi skidd,

If you have J1.5.20 or later then consider using V4 instead, the new version will have multi page forms support, but all your old forms on V3 will have to be remade of course.

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
GreyHead 30 Jan, 2012
Hi skidd,

Have you fixed this? I tested the form and didn't seem to get a file-name preloaded the second time through?

Bob
skidd 02 Feb, 2012
It's very weird, you go through once you get nothing. On the second time you get your Files Array and everywhere populated with the data of the files you uploaded the first time. So my vars pointing to my files are always in the past.

I guess I can just try and do it on v4, they are pretty small forms.
This topic is locked and no more replies can be posted.