Redirection 404 not using error page template

I have set up a 404 error response for the ‘uncategorised’ default wp category archive page using the redirection plugin. This redirects to a (presumably) wordpress default 404 page and not the error page template that is set up in bricks.

Archive page in question https://forestretreats.co.uk/category/uncategorised/

Bricks error page https://forestretreats.co.uk/category/uncategorised/blahblah

Is there a way to fix this? Happy to use a code snippet if theres a better way to handle this other than redirection plugin.

Thanks :slight_smile:

1 Like

Did you figure out a solution to this? (from the URLs it looks like not)

I posted a similar question recently:

and found another similar one:

but no answers… there has to be a way to load the Bricks custom 404 error page…

No this did not get fixed in the end

1 Like

I got a response in my post. I hope they look into this more. I did look into the code a bit and the Bricks 404.php file does get called but for some reason it doesn’t find the custom error template for some reason and it defaults to the simple default one they created (with the Whoops message)

1 Like

any official solution come about yet?

No not yet. In my other post on the topic I showed Bricks where in their code it was failing to detect the 404 template but no response from them if a fix is in the works.

Hi all,

maybe try this for now.

function redirect_uncategorized_posts() {
    if (is_single() && in_category('uncategorized')) {
        wp_redirect(home_url('/404')); // Redirect to the 404
        exit();
    }
}
add_action('template_redirect', 'redirect_uncategorized_posts');

Your solution will not work as the problem actually starts in the Bricks 404 page file. It looks for a template file and doesn’t find one and displays just a default whoops message.

There is a bug in certain situations as the template array Bricks checks for an error file has not been updated yet.

anyone have a fix?‎‎‎‎‎‎‎

I also tried but didn’t get fix.

any update on this?? @timmse

Can confirm after creating and designing an Error 404 template and assigning it Template Settings > Conditions > (show on) Error page, Bricks only shows the default template containing: “Whoops, that page is gone” and a search box. Switching off Bricks > Settings > Templates> Disable default templates has no change in effect.

  • Bricks v1.9.1.1
  • Breeze (2.0.29)
  • Object Cache Pro is disabled
1 Like

This does appear to be a bug. I have it working on one site and not another using the same conditions. So I am assuming an update has knocked something out of whack here. The 404 page should display when the condition of the template is set to error page (show). But it isn’t.

Same thing here. Oddly enough 404 was working just fine until recent update for me, but now just shows the “Whoops” page with search bar. I’ve submitted a bug report.

Hi guys,
This issue should have been fixed with Bricks 1.9.2 - please have a look at the corresponding bug report: SOLVED: 404 Page Template not Showing despite conditions set

2 Likes

can confirm. thanks for the update @timmse

1 Like

thank you so much for your help as always @timmse

1 Like

This issue has not been fixed as far as I can tell as I have the same problem as before.

For a more complete explanation see:

1 Like

experiencing this issue - current version of bricks as of writing:

example: https://floridaseating.com/product-category/quick-ship/outdoor-quick-ship/404asdf

yet it works here: https://floridaseating.com/sdcsdc