[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [BP][FIX] Allow non-latin characters in tracker field name when editing recategorization event

"Olivier Kango \(@olivierkango\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <69aee984976f_3b1893683355f@gitlab-sidekiq-low-urgency-cpu-bound-v2-74685b5685-n9jcg.mail>

Olivier Kango pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki


Commits:
c9b86eda by Olivier Kango at 2026-03-09T17:11:43+02:00
[BP][FIX] Allow non-latin characters in tracker field name when editing recategorization event
---
* [FIX] servicelib.php: Undefined array key "controller"
---
* [FIX] Undefined array key 'controller' in getUrl() calls when sefurl enable

See merge request tikiwiki/tiki!8831

(cherry picked from commit 5c67287963fde00b534380fc7cc62b552abfe96d)

See merge request tikiwiki/tiki!9720

- - - - -


3 changed files:

- lib/core/Services/OAuthServer/Controller.php
- lib/core/Tracker/Field/UserSelector.php
- lib/servicelib.php


Changes:

=====================================
lib/core/Services/OAuthServer/Controller.php
=====================================
@@ -113,6 +113,8 @@ class Services_OAuthServer_Controller
 
         if (empty($user)) {
             unset($_SESSION['loginfrom']);
+            $params['controller'] = 'oauthserver';
+            $params['action'] = 'consent';
             $_SESSION['loginfrom'] = $servicelib->getUrl($params);
             $accesslib->redirect('tiki-login_scr.php');
             exit;


=====================================
lib/core/Tracker/Field/UserSelector.php
=====================================
@@ -354,10 +354,11 @@ class Tracker_Field_UserSelector extends \Tracker\Field\AbstractItemField implem
                         $selected_groups = array_unique(array_merge($selected_groups, $userlib->get_user_groups($v)));
                     }
                     TikiLib::setExternalContext(true);
-                    $templateData['remote_url'] = TikiLib::lib('service')->getUrl([
+                    $params = [
                         'groups' => implode(',', $selected_groups),
                         'listonly' => $this->trackerField->getOption('showRealname') ? 'userrealnames' : 'users',
-                    ]);
+                    ];
+                    $templateData['remote_url'] = TikiLib::lib('service')->getUrl('tiki-ajax_services.php?' . http_build_query($params));
                 } else {
                     $users = $userlib->get_members($groups);
                     foreach ($users as $group => &$usrs) {


=====================================
lib/servicelib.php
=====================================
@@ -53,16 +53,24 @@ class ServiceLib
 
         $url = '';
         if (isset($prefs['feature_sefurl']) && $prefs['feature_sefurl'] == 'y') {
-            $url = "tiki-{$params['controller']}";
-
-            if (isset($params['action'])) {
-                $url .= "-{$params['action']}";
+            if (! isset($params['controller'])) {
+                trigger_error(
+                    'getUrl() called with array missing "controller" key. Use string parameter for direct URLs. Parameters: ' . json_encode($params),
+                    E_USER_NOTICE
+                );
+                $url = 'tiki-ajax_services.php';
             } else {
-                $url .= "-x";
-            }
+                $url = "tiki-{$params['controller']}";
 
-            unset($params['controller']);
-            unset($params['action']);
+                if (isset($params['action'])) {
+                    $url .= "-{$params['action']}";
+                } else {
+                    $url .= "-x";
+                }
+
+                unset($params['controller']);
+                unset($params['action']);
+            }
         } else {
             $url = 'tiki-ajax_services.php';
         }



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

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/c9b86eda2ebce008aa157d65e6536c56a5943a6b
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.