[TikiWiki-commits] [Git][tikiwiki/tiki][27.x] [FIX] prefixalias: The itemId was getting removed

"Jonny Bradley \(@jonnybradley\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6a0ccce3bc34f_3823b39c765bd@gitlab-sidekiq-low-urgency-cpu-bound-v2-7487b99dc7-tnzlw.mail>

Jonny Bradley pushed to branch 27.x at Tiki Wiki CMS Groupware / Tiki


Commits:
0a6d950e by Jonny Bradley at 2026-05-19T20:43:19+00:00
[FIX] prefixalias: The itemId was getting removed
---
* [FIX] prefixalias: The itemId was getting removed in `$wikilib->sefurl` so adapt `get_trackeritem_pagealias` to keep the seful (or not) page name/slug separate and add the itemId after

See merge request tikiwiki/tiki!10253

- - - - -


3 changed files:

- lib/smarty_tiki/Modifier/Sefurl.php
- lib/trackers/trackerlib.php
- tiki-sefurl.php


Changes:

=====================================
lib/smarty_tiki/Modifier/Sefurl.php
=====================================
@@ -111,6 +111,11 @@ class Sefurl
                 }
                 if ($replacementpage) {
                     $href = \TikiLib::tikiUrlOpt($wikilib->sefurl($replacementpage, $with_next, $all_langs));
+                    if ($prefs['feature_sefurl'] === 'y') {
+                        $href .= $source;
+                    } else {
+                        $href .= "&itemId=$source";
+                    }
                     if ($prefs['feature_sefurl_title_trackeritem'] == 'y') {
                         $title = $trklib->get_title_sefurl($source);
                     }


=====================================
lib/trackers/trackerlib.php
=====================================
@@ -918,7 +918,7 @@ class TrackerLib extends TikiLib
 
             $p_links = $semanticlib->getLinksUsing('prefixalias', ['fromPage' => $target]);
             if (count($p_links)) {
-                $ret = $p_links[0]['toPage'] . $itemId;
+                $ret = $p_links[0]['toPage'];
                 return $ret;
             } else {
                 return false;


=====================================
tiki-sefurl.php
=====================================
@@ -110,7 +110,7 @@ function filter_out_sefurl($tpl_output, $type = null, $title = '', $with_next =
                     $pagealias = $trklib->get_trackeritem_pagealias($matches[1])
             ) {
                 $title = '';
-                $tpl_output = "./tiki-index.php?page=" . $pagealias;
+                $tpl_output = "./tiki-index.php?page={$pagealias}&itemId={$matches[1]}";
             }
         }
     }



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/0a6d950e04b2b74ddc015c3bd2848253d5f09205

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/0a6d950e04b2b74ddc015c3bd2848253d5f09205
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.