Closed jvevfvf closed 11 months ago
This is for the latest version on joomla 4
Thanks for the report.
I am happy to fix this, but would like to understand a bit better when this problem is triggered. Have you encountered an error in navigating a web site? In which case do we end up here?
When trying to delete a track. (task=delete) Sorry, forgot to make that clear. Cheers Jeff
This was the route: /component/jtg/track/delete/270 So three segments. (missed a double == above too, and needed to define $task doh). Without the code, the route is: /component/jtg/track/delete?id=272 which just shows the route, and doesn't delete
This is my code:
$view = '';
if (isset($query['view']))
{
$view = $query['view'];
$segments[] = $view;
unset($query['view']);
}
if (isset($query['layout']))
{
$segments[] = $query['layout'];
unset($query['layout']);
}
if (isset($query['controller']))
{
$segments[] = $query['controller'];
unset($query['controller']);
}
$task='';
if (isset($query['task']))
{
$task=$query['task'];
$segments[] = $query['task'];
unset($query['task']);
}
if (($view == 'track' || $view == 'cat' || $task=='delete') && isset($query['id']))
{
$segments[] = $query['id'];
unset($query['id']);
}
Thanks for the additional info. The new pre-release:
https://github.com/mastervanleeuwen/J-TrackGallery/releases/tag/0.9.34-rc34
has this fix included.
Thanks. It looks good now. Cheers Jeff
jtgBuildRoute Need to add id to segment i.e if (($view == 'track' || $view == 'cat' || $task='delete') && isset($query['id'])) { $segments[] = $query['id']; unset($query['id']); } so that in parseRoute we don't drop into the count==2 section, but fall into the else which then calls ParseRouteFile