Loading...
 
Skip to main content

Editing tracker items fails when filtered by categories

Status
Closed
Subject
Editing tracker items fails when filtered by categories
Version
4.x
Category
  • Conflict of two features (each works well independently)
  • Error
  • Usability
Feature
Category
Trackers
Resolution status
Fixed or Solved
Submitted by
mrisch
Lastmod by
Ushindi Gedeon
Rating
(0)
Description

If you filter on a category field in trackers, you cannot edit any viewed tracker items. The system returns a SQL error because filterfield is set, and filtervalue is null. If you filter on other fields, you can save, with no errors.

I have traced the problem to the calling of trklib->list_items (this holds the query that fails). This function is used to call and order the other tracker items for easy pagination of the filtered tracker items after a save.

However, the real problem is that $_REQUST'filtervalue' and $tryfiltervalue get lost in tiki-view_tracker_item.php when the save submit action is done on the form. Other URL query parameters appear to be stored as hidden fields on save action in tiki-view_tracker_item.

For whatever reason, non-array filtervalue fields (e.g. plain text fields) are remembered and thus the pagination and call to list_items works just fine.

However, when there is an array filtervalue (like there is with category fields), then filtervalue gets lost on the save action, and the save fails on a malformed query.

Solution
Look for $_REQUEST'cant' - if set, then skip listing all items. A bit of a kludge, but should work.
Workaround
Importance
8
Priority
40
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
2843
Created
Monday 02 November, 2009 16:13:42 UTC
by Unknown
LastModif
Monday 01 June, 2026 16:00:39 UTC


Show PHP error messages