On 07.04.2011, at 12:33, Laurent MINOST wrote: > Currently using an heavily modified version of OTRS 2.3.4 here, we will > upgrade to 2.4.9 soon (at least I hope ...) and discovered a bug/wrong > behaviour within the Search functionnality of FAQ module : > > Steps to reproduce : > - Create a new article and fill Problem or Solution or any textarea field > with a text not containing the string 'br' followed by line feed/carriage > return. > - Do a search with the FAQ module Search functionnality on the expression > 'br' (without quotes of course). > - You will see that your recently created FAQ article will appear in the > results even if it does not match the search because it is not containing the > string 'br', the problem is due to the fact that OTRS is saving the FAQ > article text as HTML and so HTML tags are saved in the database (which is > normal) BUT the search is done with an SQL query on these fields so if you > have an HTML tag such as <br /> or <br> or any others that match then your > FAQ article will be (*wrongly*) listed in your FAQ search results. > This is very annoying if you do some cut/paste operations from shitty HTML > generator like Microsoft Word which generates some specific HTML tags which > could match a lot of strings ... > > This is the SQL query sent by OTRS on the database to see which FAQ articles > will match : > > SELECT i.id, count( v.item_id ) as votes, avg( v.rate ) as vrate FROM > faq_item i LEFT JOIN faq_voting v ON v.item_id = i.id LEFT JOIN faq_state s > ON s.id = i.state_id WHERE ((i.f_number LIKE '%br%' OR i.f_subject LIKE > '%br%' OR i.f_keywords LIKE '%br%' OR i.f_field1 LIKE '%br%' OR i.f_field2 > LIKE '%br%' OR i.f_field3 LIKE '%br%' OR i.f_field6 LIKE '%br%' ) ) AND > s.type_id IN (1, 3, 2) GROUP BY i.id, i.f_subject, i.f_language_id, > i.created, i.changed, s.name, v.item_id ORDER BY i.id DESC LIMIT 200 > > I think that this is a bug and should be corrected, this occurs within OTRS > 2.3.x / 2.4.x / 3.0.x, I think that independantly of the OTRS > framework/version used all FAQ modules are affected. > > Anyone who could confirm the behaviour please before submitting it to OTRS > bugzilla ? > Any thoughts on how to avoid this behaviour would be very appreciate, it > currently affects our production system so I 'm searching a way to fix it by > myself on 2.3.x/2.4.x as I stongly think a fix will not occurs since the 3.x > branch release.
I tested with the latest OTRS and the latest FAQ and I can confirm this bug! If you search for HTML tag-names like “br”, “strong”, etc. the list of articles in the result screen doesn’t match expectations. Please be so kind and create a new entry on bugs.otrs.org. THX for highlighting! Cheers, Nils -- Nils Leideck http://webint.cryptonode.de / a Fractal project --------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs