Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
customerror
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
customerror
Commits
c1373945
Commit
c1373945
authored
2 years ago
by
ressa
Committed by
Gisle Hannemyr
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Resolve
#3327195
"Change readme.txt to"
parent
8703d2b6
No related branches found
No related tags found
1 merge request
!2
Resolve #3327195 "Change readme.txt to"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+26
-30
26 additions, 30 deletions
README.md
with
26 additions
and
30 deletions
README.md
+
26
−
30
View file @
c1373945
# Customerror
## Contents of this file
-
Introduction
...
...
@@ -10,7 +12,6 @@
## Introduction
**Customerror**
allows the site administrator to create custom error
pages for HTTP status codes 403 (access denied) and 404 (page not
found), without the need to create nodes for each of them.
...
...
@@ -48,42 +49,37 @@ accommodate future error codes easily.
`/admin/help/ah/customerror/README.md`
.
## Installation
:
## Installation
1.
Install as you would normally install a contributed drupal
module. See:
[
Installing modules
][
5
]
for further information.
2.
To install, tick the
**Customerror**
module on the
*Extend*
page. Click on "Install".
## Configuration
:
## Configuration
First, configure Basic site error reporting:
1.
Navigate to
**
Manage » Configuration » System » Basic site
settings
**
- In the "Error pages" section, for 403 (access denied), enter
the value: customerror/403 - For 404 (not found), enter the
value: "`customerror/404`".
- Click on "Save configuration".
2.
Configure the module:
-
Navigate to
**Manage » Configuration » System » Custom error**
.
-
Enter any title and description you want for the 404 (not found)
and 403 (access denied) pages.
-
You can use any HTML tags to format the text.
Click on Save configuration.
3.
Test your error pages.
-
Copy your present admin page url.
-
Try to go to a non-existent Drupal page on your site.
You should see your custom error page for 404 (not found) page.
-
Log out from your site.
-
Paste the admin page url and try to go there.
You should see your custom error page for 403 (access denied) page.
settings
**
-
In the "Error pages" section, for 403 (access denied), enter
the value:
`customerror/403`
-
For 404 (not found), enter the value:
`customerror/404`
-
Click on "Save configuration".
1.
Configure the module:
-
Navigate to
**Manage » Configuration » System » Custom error**
.
-
Enter any title and description you want for the 404 (not found)
and 403 (access denied) pages.
-
You can use any HTML tags to format the text.
-
Click on Save configuration.
1.
Test your error pages.
-
Copy your present admin page url.
-
Try to go to a non-existent Drupal page on your site.
You should see your custom error page for 404 (not found) page.
-
Log out from your site.
-
Paste the admin page url and try to go there.
You should see your custom error page for 403 (access denied) page.
Note that
**Customerror**
keeps track of what page the user is trying to
access, so after logging in, the user will be redirected to that page.
...
...
@@ -135,9 +131,9 @@ modifications there.
**Q: I want to have a different template for my 404 and 403 pages.**
**A:**
Copy
"
`customerror.html.twig`
"
to
"
`customerror--404.html.twig`
"
and
"
`customerror--403.html.twig`
"
. You
do not need a
"
`customerror.html.twig`
"
for this to work.
**A:**
Copy
`customerror.html.twig`
to
`customerror--404.html.twig`
and
`customerror--403.html.twig`
. You
do not need a
`customerror.html.twig`
for this to work.
**
Q: Some 403 errors (e.g. "http://example.org/includes") are served
by the Apache web server and not by Customerror. Isn't that a
...
...
@@ -155,7 +151,7 @@ ErrorDocument 403 /error/403.html For more information about this, see
## Maintainers
The project's owner is
[
kbahey
][
6
]
(Khalid Baheyeldin
–
The project's owner is
[
kbahey
][
6
]
(Khalid Baheyeldin
-
[
https://baheyeldin.com/khalid
][
7
]
and
[
https://2bits.com/
][
8
]
).
The current maintainer is
[
gisle
][
8
]
(Gisle Hannemyr).
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment