I'm trying to make a link that acts as the "save 2 copy" button on the edit page.
On the main page for the item, I am creating the link according to this documentation: https://docs.joomla.org/How_to_add_CSRF_anti-spoofing_to_forms
<a href="<?php
echo JRoute::_( 'index.php?option=com_pakker&view=jj_pakke&task=jj_pakke.save2copy&id=1&'. JSession::getFormToken() .'=1' );
?>">
Which generates links like:
http://mysite.com/index.php/jj_pakke/1?task=jj_pakke.save2copy&55cdb8304fef2c8a80be2620d18ae367=1
The error I'm getting is:
security token did not match
get
parameter?JSession::checkToken( 'get' ) or die( 'Invalid Token' );