Error.php - Forum | JoomShaper
Staff replied Helix Framework

Error.php

Asked by Chris Elliott 2 months ago Last activity 2 months ago

I have been asked to create a completely bespoke 404 error page.Looking at the error.php file, it's very basic. I've now created a successful custom_error PHP file, and can use this to overwrite the content of the error.php file to create the elegant 404 error page required.
The problem, of course, is that when Helix Ultimate is upgraded, the error.php file is overwritten back to the plain 404 page. I looked at the module insertion idea, but it simply didn't give the look and feel that was needed by the end user.
Can you investigate the possibility of using overrides somehow to ensure that the custom error file I've created is not overwritten?

Your advice is welcome.

8 replies

Ziaul Kabir Staff

Hi Chris,

Thanks for reaching out to us.

Have you had a chance to check the following resources?

These may provide an approach that avoids modifying the error.php file directly, so your custom 404 page won't be overwritten during future updates. Please let us know if they meet your requirements or if you're looking for a different type of override mechanism.

Thanks

Chris Elliott Asked this

thanks for those two links.

both make reference to editing the error.php file. So... is it the case that the error.php file is NOT over written when HU is updated? I sense the file IS over written because i have sites where i adapted the error.php file to generate a customer approved 404 page but following recent HU updates, that file was toasted and replaced with the HU default error.php file.

Cab this be confirmed?
chris

Ziaul Kabir Staff

Hi Chris,

Yes, you are correct. If you modify the error.php file directly, your changes will be overwritten the next time Helix Ultimate template is updated, as the template files are replaced during the update.

At the moment, there isn't an alternative solution or an override mechanism available to preserve custom changes to error.php.

Thank you for your understanding.

Thanks,

Chris Elliott Asked this

In which case, someone needs to edit the first link you gave as its wrong.

C

Ziaul Kabir Staff

If you want to use sp page builder to create a error page, then follow the article.

Thanks

Chris Elliott Asked this

so, please can i raise a feature request that makes it possible to create an override for error.php so it isnt replaced on HU update?

Ziaul Kabir Staff

Sure. However, this would require a significant architectural change, such as supporting a main template with child templates. Without that, it's not possible to implement this right now.

We do have plans to support this in the future, but I can't provide an exact timeframe at the moment.

Thanks for your understanding.

Log in to reply.