Bug 858116 - Sign in after searching on documents page causes error
Sign in after searching on documents page causes error
Status: CLOSED CURRENTRELEASE
Product: Zanata
Classification: Community
Component: WebSite (Show other bugs)
1.7
Unspecified Unspecified
unspecified Severity low
: ---
: 2.0
Assigned To: Alex Eng
Ding-Yi Chen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-17 22:31 EDT by David Mason
Modified: 2012-11-07 01:19 EST (History)
3 users (show)

See Also:
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 01:19:17 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Mason 2012-09-17 22:31:07 EDT
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 00:48:04 EDT
Error does not occur in version 2.0.
Comment 2 Sean Flanigan 2012-09-26 22:01:13 EDT
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-26 22:08:01 EDT
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-01 21:43:22 EDT
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 01:16:28 EDT
VERIFIED with Zanata version 1.8.0-SNAPSHOT (20121009-1428)
Comment 6 Sean Flanigan 2012-11-07 01:19:17 EST
Fix released in Zanata 2.0.

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