Skip to content

Commit 4afcf74

Browse files
authored
Tags: Make router discover 404s properly (joomla#44540)
1 parent e0ff61e commit 4afcf74

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

components/com_tags/src/Service/Router.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,15 @@ public function parse(&$segments)
286286

287287
while (\count($segments)) {
288288
$id = array_shift($segments);
289-
$ids[] = $this->fixSegment($id);
289+
$slug = $this->fixSegment($id);
290+
291+
// We did not find the segment as a tag in the DB
292+
if ($slug === $id) {
293+
array_unshift($segments, $id);
294+
break;
295+
}
296+
297+
$ids[] = $slug;
290298
}
291299

292300
if (\count($ids)) {

0 commit comments

Comments
 (0)