This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 177287 - unclear "error 422" when loggin on with disable cookies
Summary: unclear "error 422" when loggin on with disable cookies
Status: RESOLVED WORKSFORME
Alias: None
Product: www
Classification: Unclassified
Component: Admin (show other bugs)
Version: 6.x
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Marco Walther
URL: https://netbeans.org/people/login?ori...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-20 05:45 UTC by _ rkusterer
Modified: 2011-11-16 12:54 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkusterer 2009-11-20 05:45:04 UTC
Sometimes when I log on I get the following error:

> 422 - Change Rejected
> The change you wanted was rejected.
> Maybe you tried to change something you didn't have access to? 

I didn't want to "change" anything, I was just logging on, e.g. today from wiki.netbeans.org. I now assume it happens when my browser is not accepting cookies. Easy solution -- but the user needs know what the problem is.

If you can reproduce it, can the message be updated to be more clear? E.g. "Maybe you tried to change something you didn't have access to, or your browser did not accept cookies." or similar.
Comment 1 Petr Blaha 2009-11-20 06:22:13 UTC
I agree, we should display something more clear. The fix is easy and can add something similar in login form:

<script type="text/javascript">
    function createCookie(name, value, days) {
        var expires;
        if (days) {
            var date = new Date();
            date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
            expires = "; expires=" + date.toGMTString();
        }
        else expires = "";
        document.cookie = name + "=" + value + expires + "; path=/";
    }

    function readCookie(name) {
        var nameEQ = name + "=";
        var ca = document.cookie.split(';');
        for (var i = 0; i < ca.length; i++) {
            var c = ca[i];
            while (c.charAt(0) == ' ') c = c.substring(1, c.length);
            if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
        }
        return null;
    }

    function eraseCookie(name) {
        createCookie(name, "", -1);
    }

    function areCookiesEnabled() {
        var r = false;
        createCookie("testing", "Hello", 1);
        if (readCookie("testing") != null) {
            r = true;
            eraseCookie("testing");
        }
        return r;
    }
alert(areCookiesEnabled());
</script>

Of course, JS must be enabled.
Comment 2 Vince Kraemer 2011-07-12 16:24:56 UTC
Since Lea doesn't work for Oracle or on Kenai anymore, we might want to reassign this to an actual person that can and might do something to resolve the problem...

I do not know who that person would be...  If I did, these issues would be assigned to them when I committed this comment.