Page 1 of 2

[CDB] Error Pages

Posted: Wed Oct 01, 2014 3:26 pm
by John P
Extension Name: Error Pages
Authors: John P

Extension Description: Error Pages enables Custom Error Pages in your forum. Optionally with a explanation. It is also possible to log errors in Maintenance error log so you can look at the problems.

Extension Version: 3.1.0-RC4

Requirements: phpBB 3.1.*@dev

Features:
- Errors in your mother language
- Logging
- Logging of not found files (images etc.)

GitHub repository: https://github.com/ForumHulp/errorpages
Extension Download: https://github.com/ForumHulp/errorpages ... master.zip

Re: [DEV] Error Pages

Posted: Wed Oct 01, 2014 4:25 pm
by Meis2M
hello...
means 404 or 403 error?

thanks very lovely

Re: [DEV] Error Pages

Posted: Wed Oct 01, 2014 4:50 pm
by Louis7777
John P, I honestly love your extensions man. Thank you!

Re: [DEV] Error Pages

Posted: Wed Oct 01, 2014 6:21 pm
by John P
Hello Meis2M, yes server error it means.


Louis, thanks.

Re: [DEV] Error Pages

Posted: Wed Oct 01, 2014 10:18 pm
by nicofuma
Just a few tips:
1. You should either use

Code: Select all

 tags:
- { name: kernel.event_listener, event: kernel.exception, method: onKernelException }
or

Code: Select all


 kernel.listener.forumhulp_errorpages:
class: forumhulp\errorpages\event\listener
arguments:
- @config
- @user
- @log
tags:
            - { name: event.listener }

-----------------------

use Symfony\Component\HttpKernel\KernelEvents;

class listener implements EventSubscriberInterface
{
	...
	public static function getSubscribedEvents()
	{
		return array (
			KernelEvents::EXCEPTION => array('onKernelException', 2000),
		);
	}
}
But certainly not a mix of the both

2. getSubscribedEvents() returns an array, you don't need to call array_merge()

3. Never call trigger_error() in a controller or an event thrown only when we use the app.php frontend (like all the Symfony events (KernelEvents::*)) because it breaks a lot of things. All these events should alter the response ($event->getResponse() just edit the object returned by this method) and all the controllers have to return a response object.
You can look at the code of the \phpbb\event\kernel_exception_subscriber class if you need an example.

Re: [DEV] Error Pages

Posted: Thu Oct 02, 2014 5:57 am
by John P
Thanks Nicofuma, that was the example I was searching for but could not find.

Hi

Posted: Mon Nov 10, 2014 12:42 pm
by Mauron
Hello,
any news about the development of this extension?

Re: [DEV] Error Pages

Posted: Mon Nov 10, 2014 12:46 pm
by John P
I will send it soon to the extension db.

Re: [DEV] Error Pages

Posted: Mon Nov 10, 2014 2:23 pm
by Holger
No htaccess needed for this one?

Re: [DEV] Error Pages

Posted: Mon Nov 10, 2014 3:36 pm
by John P
Why ?

Re: [DEV] Error Pages

Posted: Mon Nov 10, 2014 3:39 pm
by Holger
I didnt know it is possible without. :D

Re: [DEV] Error Pages

Posted: Mon Nov 10, 2014 3:44 pm
by John P
OK, the old one needed a .htaccess and now symphony is doing the job

Re: [DEV] Error Pages

Posted: Mon Nov 10, 2014 3:45 pm
by Holger
Cool! Great ext! Thanks a lot!

Re: [DEV] Error Pages

Posted: Mon Nov 10, 2014 9:50 pm
by Raul [ThE KuKa]
"PR" Spanish translation ready John. :wink:

Re: [DEV] Error Pages

Posted: Tue Nov 11, 2014 7:31 am
by John P
Thanks Raul