Custom HTML Error Pages by FriendsOfFlarum

License Latest Stable Version OpenCollective

Extiverse

This extension allows you to customize the Flarum error pages.
By default these pages have only limited styling in Flarum.
Now you can change them to something that better reflects your website!

Installation

Use Bazaar or install it with Composer:

composer require fof/html-errors

Updating

composer update fof/html-errors

Configuration

Open the extension options to configure the custom HTML.
Leaving a field empty will show the default Flarum error page.

The custom error pages are only applied when browsing the forum front-end.
Any error response under /api or /admin is unaffected.

The custom error pages are not shown when debug mode is on.

You can handle additional error codes by entering the values manually in the settings table of the database.

Links

OpenCollective

An extension by FriendsOfFlarum.

One of the very first extensions I wanted to work on myself before I formed ReFlar but you beat me to it and I ain't even mad ?

LOVE IT.

Use-case:

I was able to use this HTML/CSS combo using inline CSS to produce this:

Endless Possibilities!

Again, bravo Clark for the on-going work in bringing us quality extensions! ?

    Already released a fix (0.1.1).

    Depending on the order the extensions were loaded in, it was possible for this extension to break others that relied on middleware exceptions (like the MigrateToFlarum redirect extensions). Now the middleware should be placed at the very start of the stack, meaning it only catches errors that no other extension tries to handle.

    You can get the latest version by running:

    composer update flagrow/html-errors
    8 days later

    maniraj1234 I have heard there's an extension freeze on Freeflarum until beta8 release.

    This extension might be a bit less useful with beta8 given the new default error pages are improved (still not very customizable though)

      10 months later

      Ralkage I think it's for the users of the extension to say. The use case of adding a link to the homepage is now solved by Flarum, but it might still be useful to customize the error pages without Flarum knowledge.

      If you're referring to a beta 8 update, the extension is already compatible since December (version 0.2.0), I just didn't mention it here since there were no new features and nobody had come begging for the update 😇

      5 months later

      ram0ng1 all posts from extensions that do not contain "incompatible" tag work in beta9

      This might not be 100% accurate in this period that immediately follows beta 9 release.

      Few extensions should break because there aren't many breaking changes. But moderators and extension developers haven't had the time to test all extensions on beta 9 themselves yet. In this period we rely on users reporting broken extensions to mark them as incompatible.

      Trnrr I haven't tested the extension on beta 9 so I can't say for sure. As with any extension I'd suggest first installing it locally or on a test forum so see if/how it works before installing it on your production forum. And anyone who can confirm it working/not working is welcome to share it here!

        5 months later

        Is it working with beta 10?
        I installed it without any issue but I'm not able to access to the configuration (I don't have the 3-dots menu on the extension on the extensions page).

        I just tried and it's working fine for me on beta 11.

        Either it's a caching issue, in which case you should clear the Flarum cache (command line or clear cache button on admin dashboard), and also maybe Cloudflare cache or similar if used.

        If that's not it, then the 3-dots menu disappearance could be caused by any extension that has an issue. You could try disabling extensions one by one until the menu reappears in order to find the culprit.

        There might be a javascript error message in the console of the browser development tools as well.

          clarkwinkelmann There might be a javascript error message in the console of the browser development tools as well.

          Thanks. This is a for/formatting extension issue. 😀

          I have installed the extension on 0.1.0-beta.11.1, set some text into the field in setting, and cleared the cache.
          But I still get the default error text "The page you requested could not be found.".
          Am I missing something?

          Because the Exception does not give me an errorcode, there is no lookup for any setting in the extension.

          $errorCode = $exception->getCode();

          $exception is \Flarum\Http\Exception\RouteNotFoundException
          The value of $errorCode is 0