[TikiWiki-commits] [Git][tikiwiki/tiki][28.x] 2 commits: [FIX] ItemsList: notices when filter field there is not set
"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <693d143966291_2a3fc10cc96440@gitlab-sidekiq-low-urgency-cpu-bound-v2-64d4768b4d-bfdfj.mail> |
Victor Emanouilov pushed to branch 28.x at Tiki Wiki CMS Groupware / Tiki
Commits:
a046af68 by Victor Emanouilov at 2025-12-13T09:22:23+02:00
[FIX] ItemsList: notices when filter field there is not set
- - - - -
c5580019 by Victor Emanouilov at 2025-12-13T09:22:27+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
- - - - -
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/5d3429217352da53de54df8917a3b53b00a1559d...c55800191302365e99cdd7f5fc970709b3caabd1
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/compare/5d3429217352da53de54df8917a3b53b00a1559d...c55800191302365e99cdd7f5fc970709b3caabd1
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