[ 
https://jira.codehaus.org/browse/MRM-1858?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Olivier Lamy closed MRM-1858.
-----------------------------

       Resolution: Duplicate
    Fix Version/s: 2.1.1

dup of MRM-1855

> Javascript error when no archiva_login cookie present
> -----------------------------------------------------
>
>                 Key: MRM-1858
>                 URL: https://jira.codehaus.org/browse/MRM-1858
>             Project: Archiva
>          Issue Type: Bug
>          Components: browser
>    Affects Versions: 2.1.0
>         Environment: linux / debian / chrome / ie
>            Reporter: Derek Bodin
>            Assignee: Olivier Lamy
>             Fix For: 2.1.1
>
>
> When the archiva_login cookie is not present the method to retrieve the user 
> session fails with a javascript error.  This causes the main page to not load 
> correctly.
> Adding the snippet below fixes the issue - but probably doesn't conform to 
> your style guidelines.
> js/archiva/main.js:68
> {code}
>     if(!cookieContent) return null;
> {code}
> The underlying problem is that cookieContent is undefined and the call to 
> {code}$.parseJSON(cookieContent);{code} requires valid JSON.
> {quote}
> http://api.jquery.com/jquery.parsejson/
> Prior to jQuery 1.9, $.parseJSON returned null instead of throwing an error 
> if it was passed an empty string, null, or undefined, even though those are 
> not valid JSON.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to