? Failure

User tests: Successful: Unsuccessful:

avatar zero-24
zero-24
3 Sep 2014

Issue (copy from old JC)

Problems
1. Create an article with some german umlauts (ü, ä etc.). - Search in FE with com_search for a word near but after a word with umlaut. - The highlight-SPAN starts at a wrong position. It's moved 1 position to the right for each umlaut before the search hit.
2. Create an article with some phrases and e.g. word "Potsdam". - Search for "Potsdam dam". - 2 highlighter SPANs will be set but corrupt because of overlapping search words.

Old JC

http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33492

PDF by @illovo that explain the patch

http://joomlacode.org/gf/download/trackeritem/33492/158347/Joomla-3.2.3-corrupted-highlighter-SPANs.pdf

Tests

It is tested on a german forum here (by gbuechner):
http://www.joomlaportal.de/joomla-3-x-allgemeine-fragen/311023-suchergebnisse-merkw-rdige-textmarkierung.html
and here (by k78)
http://www.joomlaportal.de/joomla-3-x-allgemeine-fragen/313194-suchbegriffe-suchresultaten-werden-falsch-markiert-protostar-template.html

Based on

This based on a closed but still valid PR (#3337) by @illovo so the kudos goes to @illovo
I only do some CS work on it. So thanks @illovo

avatar zero-24 zero-24 - open - 3 Sep 2014
avatar jissues-bot jissues-bot - change - 3 Sep 2014
Labels Added: ?
avatar zero-24 zero-24 - change - 3 Sep 2014
Status Pending Ready to Commit
Easy No Yes
avatar brianteeman brianteeman - change - 3 Sep 2014
Status New Pending
avatar n9iels
n9iels - comment - 4 Sep 2014

@test: I tested this PR according to the PDF.
My results are that the words Potsdam and Erwachs are fully highlighted when apply the patch. Is that the expecting result?

avatar zero-24
zero-24 - comment - 4 Sep 2014

thanks @n9iels

Is that the expecting result?

Yes. And as i also confirm that the patch works (code is by @illovo) i moving this to RTC.

This comment was created with the J!Tracker Application at http://issues.joomla.org/.

avatar zero-24 zero-24 - change - 4 Sep 2014
Category Search
avatar n9iels
n9iels - comment - 4 Sep 2014

confirmed the code worked correctly and give the expected result, one more test -> moving to RTC

avatar ReLater
ReLater - comment - 9 Sep 2014

@test
Successfully tested.

avatar infograf768 infograf768 - change - 10 Sep 2014
Labels Added: ?
avatar infograf768
infograf768 - comment - 10 Sep 2014

Merging now. Can you port this to 2.5?

avatar infograf768 infograf768 - close - 10 Sep 2014
avatar infograf768 infograf768 - reference | - 10 Sep 14
avatar infograf768 infograf768 - merge - 10 Sep 2014
avatar infograf768 infograf768 - close - 10 Sep 2014
avatar infograf768 infograf768 - change - 10 Sep 2014
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2014-09-10 06:51:29
avatar illovo
illovo - comment - 10 Sep 2014

Thank you, zero-24!

avatar zero-24 zero-24 - head_ref_deleted - 10 Sep 2014
avatar zero-24
zero-24 - comment - 10 Sep 2014

@infograf768

Can you port this to 2.5?

Do we need a backport?

I have just tested with the last github branche and can't reproduce the issues on 2.5 that was fixed by @illovo using the sample text and searchwords from the PDF

avatar ghost
ghost - comment - 19 Sep 2014

I've tested the PR with current joomla-cms-staging.zip (J!3) because a friend, who had found the original bug then, informed me that there are still wrongly highlighted hits if he uses searchwords with german umlauts. After some hours I'm giving up now to find a solution. More difficult than expected. See my test instructions below:

Install current joomla-cms-staging.zip or apply
#4216
to Joomla! 3.3.3

  • Create a menu item of type "Search Form or Search Results".

  • Create article named "Article Without". Enter following text and save:

Fugenlose Verlegung von keramischen Fliesen,- Platten, -Mosaik, oder Natursteine, Zementfliesen, Terracotta, Schiefer. Eine Vielzahl an Materialien die an verschiedenen Orten im,- und am Haus zum Einsatz kommen. Beim Neubauprojekt begleiten wir Sie von der Bemusterung der Materialien bis zur Fertigstellung. Für den umbau benötigt man Erfahrung. Bestandsaufnahme, richtige Materialwahl und Planung aus einer Hand, damit das Gesamteindruck stimmt. Instandhaltung. Werte erhalten und pflegen. Damit Sie länger Freude an Ihren alten Terazzo, -Zementfliesen oder Natursteinboden haben. Wir kümmern uns drum. Sie hätten es gerne Fugenlos ? Ein spezielles Verfahren bietet die Möglichkeit, zum Beispiel in der Dusche, auch Naturstein oder Feinsteinzeug-Platten wartungsfrei und fugenlos zu verlegen.

  • Create second article named "Article With". Enter following text and save:

Fugenlose Verlegung von keramischen Fliesen,- Platten, -Mosaik, oder Natursteine, Zementfliesen, Terracotta, Schiefer. Eine Vielzahl an Materialien die an verschiedenen Orten im,- und am Haus zum Einsatz kommen. Beim Neubauprojekt begleiten wir Sie von der Bemüsterung der Materialien bis zur Fertigstellung. Für den umbau benötigt man Erfahrung. Bestandsaufnahme, richtige Materialwahl und Planung aus einer Hand, damit das Gesamteindruck stimmt. Instandhaltung. Werte erhalten und pflegen. Damit Sie länger Freude an Ihren alten Terazzo, -Zementfliesen oder Natursteinboden haben. Wir kümmern uns drum. Sie hätten es gerne Fugenlos ? Ein spezielles Verfahren bietet die Möglichkeit, zum Beispiel in der Dusche, auch Naturstein oder Feinsteinzeug-Platten wartungsfrei und fugenlos zu verlegen.

  • The only difference is word "Bemusterung" (without umlaut) versus "Bemüsterung" (with umlaut).

  • Goto search page in frontend.

  1. test) Enter searchword: "nötig" (without quotes) and start searching.

Result:
Article "Article Without": "nötig" highlighted. OK.
Article "Article With": "enöti" highlighted. Not OK.

  • When searchword itself contains umlauts newly established correction of position fails when another umlaut is present inside search result before highlighted position.

  1. test) Enter searchword: "ötig" (without quotes) and start searching.

Result:
Both articles: "nöti" highlighted. Not OK.

  • When searchword itself contains umlaut as first character newly established correction of position fails always.

  • When searchword itself contains several umlauts or a word directly before does newly established correction of position fails always.

So, the PR is better than behaviour before but still doesn't work correctly.

Add a Comment

Login with GitHub to post a comment