[TYPO3-project-formidable] Yet anothe PASSTHRU question

Jérémy Lecour jeremy.lecour at gmail.com
Tue Sep 26 16:48:26 CEST 2006


I've found the bug.

In the HIDDEN renderlet, a condition was missing to determine wether
pick the current value or the default

The original portion :
if($this->oForm->oDataHandler->_isSubmitted())
{ $value = $aFormData[$this->_getName()];}
else
{ $value = $this->_getDefaultValue();}

The good one :
if($this->oForm->oDataHandler->_isSubmitted() ||
array_key_exists($this->_getName(), $aFormData))
{ $value = $aFormData[$this->_getName()];}
else
{ $value = $this->_getDefaultValue();}

I've compared it with the TEXT renderlet wich was working perfectly.

Tell me if I have to submit a bug in the bugtracker.

2006/9/22, Jérémy Lecour <jeremy.lecour at gmail.com>:
> I still have an issue. The crdate is set to 'now' even if it's set up
> like you said !
> Strange, …
>
> With the debug I can see that when I load the record, in the
> _getFormDataManaged() result it is still the good timestamp but in the
> renderer result it's updated to 'now'
>
> 2006/9/22, François SCHOSSIG <fs.nospam1 at a-e-r.org>:
> > I had the same problem. Here is the solution :
> >      <renderlet:PASSTHRU name="tstamp">
> >        <data>
> >          <value>CURRENT_TIMESTAMP</value>
> >        </data>
> >      </renderlet:PASSTHRU>
> >
> >      <renderlet:HIDDEN name="crdate">
> >        <data>
> >          <defaultvalue>CURRENT_TIMESTAMP</defaultvalue>
> >        </data>
> >      </renderlet:HIDDEN>
> >
> > Bon dimanche !
> > --
> > F. SCHOSSIG, ICT Manager
> > Assemblée des Régions d'Europe
> > http://www.a-e-r.org
> >
> >
> > Le 22 sept. 06 à 16:27, Jérémy Lecour a écrit :
> >
> > > Hi,
> > >
> > > I have 2 PASSTHRU elements for date handling : crdate and tstamp
> > >
> > > When I'm in creation mode, it's normal to set the 2 values, but in
> > > edition mode, how can I disable the crdate. For now the creation date
> > > is always overwritten, it's not good.
> > >
> > > Thanks for any help.
> > >
> > > --
> > > Jérémy Lecour : <mailto:jeremy.lecour at gmail.com>
> > > webdesigner, webmaster et développeur web
> > > Trésorier du PLUG : Provence Linux User Group
> > > http://www.plugfr.org/
> > > _______________________________________________
> > > TYPO3-project-formidable mailing list
> > > TYPO3-project-formidable at lists.netfielders.de
> > > http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-
> > > formidable
> >
> > _______________________________________________
> > TYPO3-project-formidable mailing list
> > TYPO3-project-formidable at lists.netfielders.de
> > http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-formidable
> >
>
>
> --
> Jérémy Lecour : <mailto:jeremy.lecour at gmail.com>
> webdesigner, webmaster et développeur web
> Trésorier du PLUG : Provence Linux User Group
> http://www.plugfr.org/
> _______________________________________________
> TYPO3-project-formidable mailing list
> TYPO3-project-formidable at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-formidable
>


-- 
Jérémy Lecour : <mailto:jeremy.lecour at gmail.com>
webdesigner, webmaster et développeur web
Trésorier du PLUG : Provence Linux User Group
http://www.plugfr.org/



More information about the TYPO3-project-formidable mailing list