[TYPO3-dev] formtoken backend problem

Benjamin Beck BenjaminBeck at gmx.de
Tue Aug 23 17:05:37 CEST 2011


Hi Sebastian,

have you tried adding the token with the t3lib_BEfunc::getUrlToken($formName);


I found this DOC for the $formname:

After introducing a protection, all extensions that provide backend modules
using alt_doc.php, tce_db.php or tce_file.php need to provide a token in the
URL or the form. This can be done by using the following code:

*alt_doc.php*
 t3lib_TCEforms::getHiddenTokenField('editRecord'); 
 // or 
 t3lib_BEfunc::getUrlToken('editRecord');

*tce_db.php*
 t3lib_TCEforms::getHiddenTokenField('tceAction'); 
 // or 
 t3lib_BEfunc::getUrlToken('tceAction');

*tce_file.php*
 t3lib_TCEforms::getHiddenTokenField('tceFileAction'); 
 // or 
 t3lib_BEfunc::getUrlToken('tceFileAction');


Benjamin



On Aug 23, 2011, at 4:51 PM, Sebastian May wrote:

> Hi,
> 
> i've got a backend plugin that generates links for hiding objects, but since
> the update to 4.5 these links aren't working anymore.
> 
> This is what i get!
> 
> Validating the security token of this form has failed. Please reload the
> form and submit it again.
> 
> 
> 
> I've tried to generate the Token like the typo wiki shows how to do it, and
> the links seems pretty much the same as in the list plugin, but they aren't
> working.
> 
> http://wiki.typo3.org/wiki/Pending_Documentation
> 
> 
> 
> $formToken =
> t3lib_formprotection_Factory::get()->generateToken('tx_comments_comments');
> 
> And this parameter has to be part of the link, but it won't work.
> 
> 
> 
> I tried to rebuild the links from the typo3-list plugin to hide a object
> within on click.
> 
> And that worked fine until the update.
> 
> 
> 
> Any suggestions?
> 
> 
> 
> 
> 
> --
> 
> Mit freundlichen Grüßen
> 
> Best Regards
> 
> 
> 
> Sebastian May
> 
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev





More information about the TYPO3-dev mailing list