Question

On access of a non-existant page:

  1. In author instance my 404 page is displayed.

  2. In publish, a geometrixx login page is displayed.

If I remove the Default Login Page of Day CQ Login Selector Authentication Handler, 404.jsp works, but I cannot open /libs/cq/core/content/welcome.html anymore.

How can I solve this, what is the problem with the default 404.jsp?

I found this workaround custom 404.jsp where they added isAuthorInstance() method. Is this the right solution?

Thanks in advanced!

Was it helpful?

Solution

If the request is made through a browser by an anonymous user, a login is requested otherwise, the error page is displayed. This is the way the default 404.jsp that is present under /libs/sling/servlet/errorhandler/404.jsp is implemented.

The following code is an excerpt from the default 404.jsp. If you can observe, the login is requested and the control is returned if the user is anonymous.

if (isAnonymousUser(request) && isBrowserRequest(request) {
    ....
    try {
        auth.login(request, response);

        // login has been requested, nothing more to do
        return;
    } 
    ....
}

In case of author instance, we are prompted to login initially, due to which the above condition would fail and the rest of the JSP continues to execute, hence the 404 page is displayed. On the other hand, the pages in publish instance can be accessed even without logging in, because of which you are redirected to the login page.

You could use the same workaround which you have found to get around this issue.

And make sure you are not modifying anything under /libs, make the changes to the files by overriding them under /apps.

OTHER TIPS

If you removed the Default Login Page of Day CQ Login Selector Authentication Handler you cannot open /libs/cq/core/content/welcome.html You cannot login!

To solve the problem you can open file

\crx-quickstart\launchpad\config\com\day\cq\auth\impl\LoginSelectorHandler.config

write again

auth.loginselector.defaultloginpage="/libs/cq/core/content/login"

stop and start CQ.

In file -

\crx-quickstart\launchpad\config\com\day\cq\auth\impl\LoginSelectorHandler.config

write

auth.loginselector.defaultloginpage="/libs/granite/core/content/login"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top