Is there a way to prevent a context from showing blocks on Access Denied / Page Not Found errors?

I tried installing Context 403 module, creating an active context on 403/404 pages, then negating that context in the other context that normally shows blocks. Nothing happened.

I'd like to suppress context(s) on 403/404 as well as have it work with Views 403/404 pages.

Is the only way to do this to create custom error pages and negate based on path?

Comments

mrfelton’s picture

Looking for this too (for D7). When you hit a 403, the path does not change and so any contexts that have been set up based on path still take effect.

snufkin’s picture

Are you using http://drupal.org/project/context_error ? If not try with that, it sounds like something that module should be responsible for.

mrfelton’s picture

I'm not using context error, but the problem with that as I see it, is that you would have to apply it in a negative state to every single context on the site to stop the blocks showing up for a 403 on paths covered by each context.

Core blocks don't show up on 403 pages by default - should context blocks?

kevinquillen’s picture

The problem with Context Error is that the context is active if you are on the site_404 or site_403 page itself- the context would need to also work if Drupal headers contain 404 or 403- and also, be able to negate the condition (show if 404, DONT show if 404).

I would like to show blocks (block404 module does this) with contexts on 403/404 pages so the layout is not interrupted.

I tried to add a headers check to Context Error, but had no luck in negating it.

j0rd’s picture

Version: 6.x-3.0-rc2 » 7.x-3.x-dev

I have this problem. Anyone have a fix?

For me, same issue. Page is denied for anonymous users via menu access argument's, but then the context is adding blocks that anonymous user should not be seeing.

semei’s picture

Issue summary: View changes

I also required this feature, following.