Bug 858116 - Sign in after searching on documents page causes error
Summary: Sign in after searching on documents page causes error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Zanata
Classification: Retired
Component: WebSite
Version: 1.7
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 2.0
Assignee: Alex Eng
QA Contact: Ding-Yi Chen
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-18 02:31 UTC by David Mason
Modified: 2012-11-07 06:19 UTC (History)
3 users (show)

Fixed In Version: 1.8.0-SNAPSHOT (20121009-1428)
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-07 06:19:17 UTC
Embargoed:


Attachments (Terms of Use)

Description David Mason 2012-09-18 02:31:07 UTC
Description of problem:
When not logged in, if a search has been run on a language-specific document page, signing in will cause an error to be shown. Sign-in is still successful.

Version-Release number of selected component (if applicable):
Zanata version 1.7.1 (20120730-2028).

How reproducible:
Always

Steps to Reproduce:
1. Not signed in to server
2. Followed a link to a documents page for a locale: e.g. https://translate.zanata.org/zanata/iteration/files/fedora-installation-guide/f17/nl
3. Enter a document name to search, e.g. "kickstart2", and press Enter. Wait for page to refresh.
4. Use "Sign In" link and enter credentials
  
Actual results:
Plain page with error is shown, without any Zanata banner on page:

An Error Occurred:

javax.el.ELException: /iteration/files.xhtml @223,95 rendered="#{projectIterationFilesAction.documentUploadAllowed}": Error reading 'documentUploadAllowed' on type org.zanata.action.ProjectIterationFilesAction_$$_javassist_seam_67


Expected results:
Signed in, document list displayed still filtered by document name search term.

Additional info:
This appears to be caused by incorrect url rewriting, which has been fixed in a development branch.

Comment 1 Alex Eng 2012-09-25 04:48:04 UTC
Error does not occur in version 2.0.

Comment 2 Sean Flanigan 2012-09-27 02:01:13 UTC
Apparently it does happen in 2.0 (make sure you search for a document, not for a project), but anyway here's part of the stack trace on 1.7.1:

Caused by: java.lang.NullPointerException
	at org.zanata.action.ProjectIterationFilesAction.isDocumentUploadAllowed(ProjectIterationFilesAction.java:221)

Comment 3 Ding-Yi Chen 2012-09-27 02:08:01 UTC
Tested with Zanata version 1.7.4-SNAPSHOT (20120927-0015)
and Zanata version 1.8.0-SNAPSHOT (20120927-0027)

This problem still exists.

The WHOLE step to reproduce in >1.8 :
1. Sign in as a translator
2. Click Projects-> AnyProject -> AnyVersion
3. Click on the document icon in column "Documents" 
   A document list should appear.
4. Copy the URL in address bar.
5. Sign out
6. Paste back the URL in address bar and vist the URL
7. Enter a document name to search, e.g. "kickstart2", and press Enter. Wait for page to refresh.
8. Use "Sign In" link and enter credentials

Thus reassigned.

Comment 4 Alex Eng 2012-10-02 01:43:22 UTC
Problem caused of hitting "enter" key in the document text box causes url changes which is invalid. 

Implemented fix by disabling "enter" key in the filtering box.

See  https://github.com/zanata/zanata/commit/f963a0a4bf7579b7da87619ff460ac5a8814963a

Comment 5 Ding-Yi Chen 2012-10-09 05:16:28 UTC
VERIFIED with Zanata version 1.8.0-SNAPSHOT (20121009-1428)

Comment 6 Sean Flanigan 2012-11-07 06:19:17 UTC
Fix released in Zanata 2.0.


Note You need to log in before you can comment on or make changes to this bug.