$mainframe = JFactory::getApplication();
$link = 'index.php?option=com_mycomp§ionid=' . $sectionid . '&task=edit&cid[]=' . $id . '&version=' . $v . '';$mainframe->redirect($link, $msg);
com_mycomp&sectionid=&task=edit&cid[]=71&version=1
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/SRnNuXydsBsJ.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.
You should redirect using JRoute class instead an string... Also check the docs to see what's for the second parameter of the function.
ie:
$link = JRoute::_('com_mycomp§ionid=' . $sectionid . '&task=edit&cid[]=' . $id . '&version=' . $v . '', false)
$mainframe->redirect($link, $msg)
Hope it helps
I have a plugin which intercepts the request to edit content and redirects to my component controller.Environemnt
Mampphp 5.3 / Joomla 2.5.4It looks like this:$mainframe = JFactory::getApplication();//do some checks and then$link = 'index.php?option=com_mycomp§ionid=' . $sectionid . '&task=edit&cid[]=' . $id . '&version=' . $v . '';$mainframe->redirect($link, $msg);The weird thing is that the redirect url is rendering the '&' as ampersands/entites like '&'So i get a redirected url from the $mainframe like this:com_mycomp&sectionid=&task=edit&cid[]=71&version=1So instead of routing to my components edit function it hits a different function altogether!If i manually remove the "&" from the url then it hits my edit function.AM stumped to see how the "&" are getting into the urls.......Anyone come across this?
Can post more code :)
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/SRnNuXydsBsJ.
To post to this group, send an email to joomla-dev-general@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-general+unsub...@googlegroups.com.
2012/6/30 Alan SparkesI have a plugin which intercepts the request to edit content and redirects to my component controller.
Environemnt
Mampphp 5.3 / Joomla 2.5.4It looks like this:$mainframe = JFactory::getApplication();//do some checks and then$link = 'index.php?option=com_mycomp§ionid=' . $sectionid . '&task=edit&cid[]=' . $id . '&version=' . $v . '';$mainframe->redirect($link, $msg);The weird thing is that the redirect url is rendering the '&' as ampersands/entites like '&'So i get a redirected url from the $mainframe like this:com_mycomp&sectionid=&task=edit&cid[]=71&version=1So instead of routing to my components edit function it hits a different function altogether!If i manually remove the "&" from the url then it hits my edit function.AM stumped to see how the "&" are getting into the urls.......Anyone come across this?
Can post more code :)
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/SRnNuXydsBsJ.
To post to this group, send an email to joomla-dev-general@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-general+unsub...@googlegroups.com.
2012/6/30 Alan SparkesI have a plugin which intercepts the request to edit content and redirects to my component controller.
Environemnt
Mampphp 5.3 / Joomla 2.5.4It looks like this:$mainframe = JFactory::getApplication();//do some checks and then$link = 'index.php?option=com_mycomp§ionid=' . $sectionid . '&task=edit&cid[]=' . $id . '&version=' . $v . '';$mainframe->redirect($link, $msg);The weird thing is that the redirect url is rendering the '&' as ampersands/entites like '&'So i get a redirected url from the $mainframe like this:com_mycomp&sectionid=&task=edit&cid[]=71&version=1So instead of routing to my components edit function it hits a different function altogether!If i manually remove the "&" from the url then it hits my edit function.AM stumped to see how the "&" are getting into the urls.......Anyone come across this?
Can post more code :)
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/SRnNuXydsBsJ.
To post to this group, send an email to joomla-dev-general@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-general+unsub...@googlegroups.com.