Loading...
 
Skip to main content

Feedback library used in AJAX services displays errors at random times

Status
Open
Subject
Feedback library used in AJAX services displays errors at random times
Version
15.x
18.x
Category
  • Bug
Feature
Search
Resolution status
New
Submitted by
Philippe Cloutier
Lastmod by
Philippe Cloutier
Rating
(0)
Description

Some AJAX services can trigger errors. Since r33686, there is a mechanism for services to report such errors. Unfortunately, this mechanism is based on PHP's sessions. Errors are displayed at the next regular Tiki page load, which may or may not be related with the request which causes the errors displayed.

This mechanism used to be implemented in lib/errorreportlib.php. Starting with Tiki 16, it was replaced by the Feedback library, but the approach hasn't changed and remains unreliable in Tiki trunk as of 2018-10-11. The Feedback library uses the tikifeedback element of $_SESSION.

This mechanism was first used by lib/search/searchlib-unified.php, but has since been spread widely, as can be seen in the commits which created the Feedback library (r58746, r58747 and r58748). One specific issue which can occur as of Tiki 18 is, after going to tiki-admin.php?page=search (which calls the lookup action of the search controller), to get a "Malformed search query" error at the next page load, which could be on tiki-admin_actionlog.php for example.

Solution
This is ultimately caused by an incomplete AJAX implementation. AJAX response handlers should support feedback in AJAX responses.
Importance
8
Easy to solve?
2
Priority
16
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
6857
Created
Thursday 11 October, 2018 16:58:23 UTC
by Philippe Cloutier
LastModif
Thursday 11 October, 2018 17:11:30 UTC


Show PHP error messages