I must say that a strike a bad luck this time.
I used Chronoforms once in a while for projects and liked it.
This time I tried to store the Joomla session using the following in the unsubmit code of the form
As you see, I created a field in the database called session_id to store the session in order to help me keep track of the guest user along many forms they will navigate on the site..
It look like chronoforms is blanking this exact value. Maybe it was a leftover of another version, but as soon as I change the code and the database for something else... like u_sess_id it start to work.
I haven't got the time to search the code, maybe I missed a setting somewhere to store the Joomla session. I would have thought that this value would be store in the database as well as the UID, CD_USER_ID and so on.
Thanks.
Hugues Lamy - http://m2i3.com
I used Chronoforms once in a while for projects and liked it.
This time I tried to store the Joomla session using the following in the unsubmit code of the form
<?php
$session = &JSession::getInstance();
$session_id = $session->getId();
JRequest::setVar( "session_id", $session_id);
?>
As you see, I created a field in the database called session_id to store the session in order to help me keep track of the guest user along many forms they will navigate on the site..
It look like chronoforms is blanking this exact value. Maybe it was a leftover of another version, but as soon as I change the code and the database for something else... like u_sess_id it start to work.
I haven't got the time to search the code, maybe I missed a setting somewhere to store the Joomla session. I would have thought that this value would be store in the database as well as the UID, CD_USER_ID and so on.
Thanks.
Hugues Lamy - http://m2i3.com
Hi Hugues,
As far as I remember there's nothing in ChronoForms that would stop you saving the session_id. The code you have there will just be executed. Does the session_id have a value before you use setVar??
Bob
As far as I remember there's nothing in ChronoForms that would stop you saving the session_id. The code you have there will just be executed. Does the session_id have a value before you use setVar??
Bob
I was able to save the session id of Joomla, but not in database column named session_id.
I got from :
to:
I soon as I change it for the other name, everything just worked.
I'll dig into this. My best guess is that something was left from an older version of ChronoForms. I remember vaguely, to have the session_id in the database. I could be wrong too.
Have a good day.
Hugues
I got from :
<?php
$session = &JSession::getInstance();
$session_id = $session->getId();
JRequest::setVar( "session_id", $session_id);
?>
to:
<?php
$session = &JSession::getInstance();
$session_id = $session->getId();
JRequest::setVar( "u_sess_id", $session_id);
?>
I soon as I change it for the other name, everything just worked.
I'll dig into this. My best guess is that something was left from an older version of ChronoForms. I remember vaguely, to have the session_id in the database. I could be wrong too.
Have a good day.
Hugues
Hi Hugues,
maybe the session_id variable is used somewhere else and changed in the Joomla framework, it should be safer to use another one, like my_session_id
Cheers
Max
maybe the session_id variable is used somewhere else and changed in the Joomla framework, it should be safer to use another one, like my_session_id
Cheers
Max
Thanks Max.
I scan the code, nothing in Chrono Forms is indicating that this doesn't work.
I just hit an bad luck to give a field name that was used somewhere else.
I'm not sure I'm going to push it further. I have many other projects to do, but I wish I could find if some other field name are restricted for any reason.
Have a good day.
Hugues Lamy - http://m2i3.com
I scan the code, nothing in Chrono Forms is indicating that this doesn't work.
I just hit an bad luck to give a field name that was used somewhere else.
I'm not sure I'm going to push it further. I have many other projects to do, but I wish I could find if some other field name are restricted for any reason.
Have a good day.
Hugues Lamy - http://m2i3.com
Hi Hugues,
Yes, nothing in Chronoforms should block this but the session_id variable may be easily used anywhere else! although I'm not sure where too! :?
Regards
Max
Yes, nothing in Chronoforms should block this but the session_id variable may be easily used anywhere else! although I'm not sure where too! :?
Regards
Max
This topic is locked and no more replies can be posted.