[TikiWiki-commits] [Git][tikiwiki/tiki][27.x] 2 commits: [FIX] Manticore: ensure unified field mapping and date field mapping are...

"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <693d1449553d2_2a17f584106c0@gitlab-sidekiq-low-urgency-cpu-bound-v2-64d4768b4d-8flv5.mail>

Victor Emanouilov pushed to branch 27.x at Tiki Wiki CMS Groupware / Tiki


Commits:
f40feb9d by Victor Emanouilov at 2025-12-13T09:22:40+02:00
[FIX] Manticore: ensure unified field mapping and date field mapping are always set in preferences as __destruct method is not always reliably called

- - - - -
b96b2165 by Victor Emanouilov at 2025-12-13T09:22:43+02:00
[FIX] ItemsList: notices when filter field there is not set

- - - - -


2 changed files:

- lib/core/Search/Manticore/Index.php
- lib/core/Tracker/Field/ItemsList.php


Changes:

=====================================
lib/core/Search/Manticore/Index.php
=====================================
@@ -214,6 +214,19 @@ class Index implements \Search_Index_Interface, \Search_Index_QueryRepository
             $this->updatePercolateIndex($this->index, $pq_mapping);
         }
 
+        if ($mapping) {
+            // store prefs on each index schema update as doing in __destruct is not reliable - various cases omit storing these prefs
+            // and search results are missing fields later
+            $fieldMapping = json_encode($this->fieldMapping);
+            if (empty($prefs['unified_field_mapping']) || $prefs['unified_field_mapping'] != $fieldMapping) {
+                TikiLib::lib('tiki')->set_preference('unified_field_mapping', $fieldMapping);
+            }
+            $dateFields = json_encode($this->dateFields);
+            if (empty($prefs['unified_date_fields']) || $prefs['unified_date_fields'] != $dateFields) {
+                TikiLib::lib('tiki')->set_preference('unified_date_fields', $dateFields);
+            }
+        }
+
         $this->dirty = true;
     }
 


=====================================
lib/core/Tracker/Field/ItemsList.php
=====================================
@@ -780,8 +780,7 @@ $("input[name=ins_' . $this->getOption('fieldIdHere') . '], select[name=ins_' .
                 isset($filterFieldHere['options_array'][0]) &&  // trackerId
                 isset($filterFieldHere['options_array'][1]) &&  // fieldId
                 // check for filterFieldThere not being another ItemLink because then we need the itemId
-                $filterFieldThere['type'] !== 'r' &&
-                $filterFieldThere['type'] !== 'w'
+                (empty($filterFieldThere) || ($filterFieldThere['type'] !== 'r' && $filterFieldThere['type'] !== 'w'))
             ) {
                 $localValue = $trklib->get_item_value(
                     $filterFieldHere['options_array'][0],



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/compare/acf3e41f9f1380c0e3b9489228f1d55627a21f7d...b96b2165565b71b4c0186c3758c93cc21bceb134

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/compare/acf3e41f9f1380c0e3b9489228f1d55627a21f7d...b96b2165565b71b4c0186c3758c93cc21bceb134
You're receiving this email because of your account on gitlab.com.

_______________________________________________
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.