Bug 759994

Summary: Editor table stops working after 'Source and Target' search returns no results
Product: [Retired] Zanata Reporter: David Mason <damason>
Component: Component-UIAssignee: Alex Eng <aeng>
Status: CLOSED NEXTRELEASE QA Contact: Ding-Yi Chen <dchen>
Severity: medium Docs Contact:
Priority: high    
Version: 1.4.3-SNAPSHOTCC: jwulf, sflaniga, zanata-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 1.4.4-SNAPSHOT (20111206-1747) Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-13 01:52:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 760842    

Description David Mason 2011-12-05 06:32:09 UTC
Description of problem:

After a search of source and target textflows has returned no results, any attempt to clear or change the search causes the editor table to remain blank until a different document is loaded.


Version-Release number of selected component (if applicable):
1.4.3-SNAPSHOT
1.5-SNAPSHOT

How reproducible:
Always


Steps to Reproduce:
1. Load a document with 1 or more text flows
2. Click the search textbox and type a string that is not present in any flows
3. Press Enter so that "There is no data to display" is shown.
4a. Click the X to clear the results
   OR
4b. Type another string in the box and press Enter

Loading a document with no content may also cause the same behaviour.


Actual results:
The editor table is blank and no text flows are shown.

Expected results:
The results of the new search are shown, or all textflows if the search was cleared.

Additional info:
Exception on Javascript console whenever this happens (just a gwt UmbrellaException though). Probably caused by trying to auto-save with an empty table.

Comment 1 Sean Flanigan 2011-12-05 06:37:50 UTC
Possible workarounds: (a) go back to document list and select a different document, or (b) reload page with F5.

Comment 3 David Mason 2011-12-06 06:29:20 UTC
merged to 1.5

Comment 4 Ding-Yi Chen 2011-12-08 06:00:26 UTC
VERIFIED with Zanata version 1.4.4-SNAPSHOT (20111206-1747)

yet problem still exist in Zanata version 1.5-SNAPSHOT (20111201-1521)

Comment 7 Ding-Yi Chen 2011-12-09 06:10:42 UTC
VERIFIED with Zanata version 1.5-SNAPSHOT (20111209-1504)

Comment 8 Ding-Yi Chen 2011-12-13 01:52:12 UTC
REVERIFIED with staging machine Zanata version 1.4.4 (20111211-2301)

Comment 9 Joshua Wulf 2012-01-26 08:22:32 UTC
RELEASE NOTES TEXT:

Cause: Users may search through a document in the online translation editor for occurrences of a search term. Both original strings and any translations are searched for occurrences of the search term. When a successful match is found, it is highlighted in the translation editor. In the case where no match was found, the editor attempted to highlight a non-existent string.

Consequence: When a search returned no results in the document currently loaded in the translation editor, the translation editor contents would blank out, requiring the page to be reloaded.

Fix: The code was modified so that the translation unit highlighting occurs only when an occurrence of a search term is located in the translation editor. If no occurrences of the search term are located, no highlighting takes place.

Result: Searches with no results no longer cause the translation editor to blank out.