[TikiWiki-commits] [Git][tikiwiki/tiki][30.x] [FIX] trackers: For the mysql engine at least, provided fields cannot be...
"Jonny Bradley \(@jonnybradley\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <69d6268b788fe_3b1911d0738ca@gitlab-sidekiq-low-urgency-cpu-bound-v2-56795c899f-gx267.mail> |
Jonny Bradley pushed to branch 30.x at Tiki Wiki CMS Groupware / Tiki Commits: 59a88504 by Jonny Bradley at 2026-04-08T09:57:28+00:00 [FIX] trackers: For the mysql engine at least, provided fields cannot be optional and need to be declared for all uses. So for Files fields to work when indexed as geometry data, we must provide the field names for all options. => Error: Commit body is empty after tags. (stupid husky rule won't allow a blank line?) Should fix https://doc.tiki.org/PluginMap when in 30.x (cherry picked from commit 938a2d9863359865e5c8ef3b76b53ac1c7a4ab1f) Co-authored-by: jonnybradley <[email protected]> - - - - - 1 changed file: - lib/core/Tracker/Field/Files.php Changes: ===================================== lib/core/Tracker/Field/Files.php ===================================== @@ -1104,40 +1104,32 @@ class Tracker_Field_Files extends \Tracker\Field\AbstractItemField implements \T public function getProvidedFields(): array { $baseKey = $this->getBaseKey(); - if ($this->getOption('indexGeometry') && $this->getValue()) { - return ['geo_located', 'geo_file', 'geo_file_format', $baseKey]; - } else { - $fields = [ - $baseKey, - "{$baseKey}_text", - "{$baseKey}_names", - "{$baseKey}_filenames", - "{$baseKey}_filetypes", - ]; - return $fields; - } + $fields = [ + $baseKey, + "{$baseKey}_text", + "{$baseKey}_names", + "{$baseKey}_filenames", + "{$baseKey}_filetypes", + 'geo_located', + 'geo_file', + 'geo_file_format', + ]; + return $fields; } public function getProvidedFieldTypes(): array { $baseKey = $this->getBaseKey(); - if ($this->getOption('indexGeometry') && $this->getValue()) { - return [ - 'geo_located' => 'identifier', - 'geo_file' => 'identifier', - 'geo_file_format' => 'identifier', - $baseKey => 'identifier' - ]; - } else { - $baseKey = $this->getBaseKey(); - return [ - $baseKey => 'sortable', - "{$baseKey}_text" => 'sortable', - "{$baseKey}_names" => 'multivalue', - "{$baseKey}_filenames" => 'multivalue', - "{$baseKey}_filetypes" => 'multivalue', - ]; - } + return [ + $baseKey => 'sortable', + "{$baseKey}_text" => 'sortable', + "{$baseKey}_names" => 'multivalue', + "{$baseKey}_filenames" => 'multivalue', + "{$baseKey}_filetypes" => 'multivalue', + 'geo_located' => 'identifier', + 'geo_file' => 'identifier', + 'geo_file_format' => 'identifier', + ]; } public function getGlobalFields(): array View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/59a8850428620b66683418bc087cd7f1f34a0044 -- View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/59a8850428620b66683418bc087cd7f1f34a0044 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