[TikiWiki-commits] [Git][tikiwiki/tiki][30.x] [FIX] Tabular: tracker selector not rendered on Create Import-Export Format page

"Adrien Mbuya Maloba \(@adrienmaloba\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <69f3366269a3e_3818fb3c4bc@gitlab-sidekiq-low-urgency-cpu-bound-v2-bd5c9fdf6-d87xj.mail>

Adrien Mbuya Maloba pushed to branch 30.x at Tiki Wiki CMS Groupware / Tiki


Commits:
7485d73c by UshindiG at 2026-04-30T13:52:55+03:00
[FIX] Tabular: tracker selector not rendered on Create Import-Export Format page
---
* [FIX] Tabular: tracker selector not rendered on Create Import-Export Format page
---
* [FIX] Tabular: fix object_selector type filter lost in AJAX query serialization

See merge request tikiwiki/tiki!9794

See merge request tikiwiki/tiki!10108

- - - - -


2 changed files:

- lib/jquery_tiki/tiki-jquery.js
- templates/tabular/create.tpl


Changes:

=====================================
lib/jquery_tiki/tiki-jquery.js
=====================================
@@ -1506,7 +1506,6 @@ $(document).tiki('copy')(
         return $.service(controller, action, o);
     };
 
-    $.paramsToProcessLength = 0;
     $.buildParams = function (query, prefix, suffix, _keysNamespace = []) {
         prefix = prefix || '';
         suffix = suffix || '';
@@ -1515,30 +1514,25 @@ $(document).tiki('copy')(
             return query;
         }
 
+        const isRoot = prefix === '';
         const params = [];
-        $.paramsToProcessLength = $.paramsToProcessLength || Object.keys(query).length;
 
         for (const [key, value] of Object.entries(query)) {
             if ($.isPlainObject(value) && ! $.isEmptyObject(value)) {
                 _keysNamespace.push(key);
                 const keyNamespace = _keysNamespace.at(-2);
                 const prefixInner = (keyNamespace ? `${keyNamespace}~`: '') + key + '[';
-
-                $.paramsToProcessLength += Object.keys(value).length - 1;
-
                 params.push(...$.buildParams(value, prefixInner, ']', _keysNamespace));
             } else if (Array.isArray(value)) {
                 value.forEach(function (av) {
                     params.push({[`${prefix}${key}${suffix}[]`]: av});
                 });
-                $.paramsToProcessLength--;
             } else {
                 params.push({[`${prefix}${key}${suffix}`]: value});
-                $.paramsToProcessLength--;
             }
         }
 
-        if ($.paramsToProcessLength) return params;
+        if (! isRoot) return params;
 
         return params.map(function (param) {
             const k = Object.keys(param)[0];


=====================================
templates/tabular/create.tpl
=====================================
@@ -23,7 +23,7 @@
         <div class="mb-3 row">
             <label class="col-form-label col-sm-3" for="trackerId">{tr}Tracker{/tr} <span class="text-danger"> *</span></label>
             <div class="col-sm-9">
-                {object_selector _class="form-control" type="tracker" _simplename="trackerId" _simpleid="trackerId"}
+                {object_selector _class="form-control" type="tracker" _simplename="trackerId" _simpleid="trackerId" _simplevalue=$format.trackerId}
             </div>
         </div>
         <div class="row mb-4">



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

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