[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Fix ATTACH plugin error when accessing tracker items

Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <68df493dc6c83_2c261f7049319a@gitlab-sidekiq-low-urgency-cpu-bound-v2-78f6c68b9-89j4b.mail>

Benoit Grégoire pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
2a5e98ca by Moïse Nturubika at 2025-10-03T03:46:31+00:00
[FIX] Fix ATTACH plugin error when accessing tracker items
---
* [FIX] Fix ATTACH plugin error when accessing tracker items

See merge request tikiwiki/tiki!7422

- - - - -


1 changed file:

- lib/wiki-plugins/wikiplugin_attach.php


Changes:

=====================================
lib/wiki-plugins/wikiplugin_attach.php
=====================================
@@ -183,8 +183,12 @@ function wikiplugin_attach($data, $params)
         if ($section == 'trackers') {
             $trklib = TikiLib::lib('trk');
             $atts_item_name = $_REQUEST["itemId"];
-            $tracker_info = $trklib->get_tracker($atts_item_name);
-            $tracker_options = $trklib->get_tracker_options($atts_item_name);
+
+            // First get the tracker ID for this item
+            $trackerId = $trklib->get_tracker_for_item($atts_item_name);
+            $tracker_info = $trklib->get_tracker($trackerId);
+            $tracker_options = $trklib->get_tracker_options($trackerId);
+
             if (! is_array($tracker_info) || ! is_array($tracker_options)) {
                 throw new Exception(tr('No tracker found matching id %0', $atts_item_name));
             }



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

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