Hello joomla people,
I had similar problem (I know this is old thread).
I've mimic Khepri functionality in front end: http://www.jlleblanc.com/option,com_fir ... 2947/#2943
But JToolbar doesn't work with SEF.
It works well without SEF.
Most used button [apply, save, cancel] is likely forwarded
to the same url as edit form instead of main form.
I don't know if it is submitform request problem or the url problem.
I already made router.php as below.
Maybe submitbutton task request (post
) always replaced by router' task.
I know we don't need any data entry to be known in search engine.
And since mixing post and get is confusing,
I've decided to disable $vars['task'].
The url looks like something?task=edit&cid=2 ..
Everything seems to be okay,
and everything is redirected to main form.
But then apply button is still
redirected to main form instead of edit form.
I've check the mvc controller,
and trapped task after clicking apply button.
function __construct( $config = array() )
parent::__construct( $config );
echo 'task = JRequest::getCmd('task');
It shows nothing
Am I missing something fool here?
I'm using post from adminFrom.
I've check with alert(document.adminForm.task.value);
After clicking apply button, it say `alert`.
<form action="#" method="post" name="adminForm" id="adminForm">
<input type="hidden" name="task" value="" />
* SEF target
// no direct access
defined('_JEXEC') or die('Restricted access');
$segments = array();
if(isset($query['controller'])) // segment
$segments = $query['controller'];
unset( $query['controller'] );
// master-id for detail, if any
if(isset($query['mid'])) // segment
$segments = $query['mid'];
unset( $query['mid'] );
if(isset($query['task'])) // segment
$segments = $query['task'];
unset( $query['task'] );
$count = count( $segments );
$vars = array();
$vars['controller'] = array_shift($segments);
$vars['mid'] = (int) array_shift($segments);
// $vars['task'] = array_shift($segments);
Sorry for the long story.