Error.php - Question | JoomShaper

Error.php

CE

Chris Elliott

Helix Framework 1 week 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.

0
9 Answers
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 1 week ago #230426

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

0
CE
Chris Elliott
Accepted Answer
1 week ago #230451

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

0
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 1 week ago #230490

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,

0
CE
Chris Elliott
Accepted Answer
1 week ago #230503

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

C

0
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 1 week ago #230519

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

Thanks

0
CE
Chris Elliott
Accepted Answer
1 week ago #230520

the article at https://www.joomshaper.com/blog/create-a-custom-joomla-404-page-with-sp-page-builder?utm_source=chatgpt.com

surely it will fail as it instructs us to EDIT THE ERROR.PHP file.

if we edit that file, as youve confirmed above, changes will be lost as soon as HU is updated.

please confirm?

0
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 1 week ago #230605

Yes, It will be replaced. You need to do it again.

Thanks

0
CE
Chris Elliott
Accepted Answer
1 week ago #230624

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?

0
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 1 week ago #230637

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.

0