Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for custom error pages within the CMS, using styled, templatable pages. #3

Open
lonnieezell opened this issue Jun 25, 2013 · 4 comments

Comments

@lonnieezell
Copy link
Contributor

No description provided.

@brockf
Copy link
Owner

brockf commented Jun 25, 2013

This can be implemented pretty easily. We use show_error() to throw serious error messages. If we extend CodeIgniter's displaying of the error with this function, we can have it (a) check if there is an error.thtml template within the user's current them and, if so, (b) display the error with that template.

@lonnieezell
Copy link
Contributor Author

Was looking into this this morning and ran into an initial problem. From within the show_404 method of the MY_Exceptions class, I can't access the CI superobject. When I tried to do get_instance() to get to Smarty it crashes complaining about no Controller as it's going through the routing.

Sounds like the only solution might hacking CI which I don't want to do. Also might be able to try another error handler that operates prior to theirs, but will have to delve into that a bit later.

@brockf
Copy link
Owner

brockf commented Aug 2, 2013

Yes it seems bizarre to me that it is this difficult. I thought there'd be
some way to specify an error controller or something like that...

  • Brock

On 2 August 2013 11:03, Lonnie Ezell notifications@github.com wrote:

Was looking into this this morning and ran into an initial problem. From
within the show_404 method of the MY_Exceptions class, I can't access the
CI superobject. When I tried to do get_instance() to get to Smarty it
crashes complaining about no Controller as it's going through the routing.

Sounds like the only solution might hacking CI which I don't want to do.
Also might be able to try another error handler that operates prior to
theirs, but will have to delve into that a bit later.


Reply to this email directly or view it on GitHubhttps://github.com//issues/3#issuecomment-22011552
.

@josev814
Copy link

Only resolution I found for this was to set the route['404_override'] to a custom module (error/view). Then have that go to error.thtml. I added an error.thtml file to each of the built in templates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants