Log message #4268308

# At Username Text
# Jul 25th 2021, 19:38 alamnaryab i have created `config/myTemplate.php` and then I am calling this template with each input as ```echo $this->Form->control('fullname', [ 'templates'=>'myTemplate', 'class'=>'form-control']);``` is there any method where I can change the default template, or I do not write `'template'=>'myTemplate'` with each input I aslo do not like to write
# Jul 25th 2021, 19:15 kevin.pfeifer or you can create a custom middleware which does that splitting for you before the request gets to your controller or anywhere else
# Jul 25th 2021, 18:28 alamnaryab it says deprecated here https://api.cakephp.org/3.4/class-Cake.Routing.Router.html#_parseNamedParams
# Jul 25th 2021, 18:23 alamnaryab following above link is showing error `*Call to undefined method Cake\Routing\Router::parseNamedParams()*` is '*parseNamedParams()*' method available in cakephp4?
# Jul 25th 2021, 17:46 kevin.pfeifer or check https://book.cakephp.org/3/en/development/routing.html#handling-named-parameters-in-urls
# Jul 25th 2021, 17:45 kevin.pfeifer @alamnaryab add this to you add function ```public function add(...$params) {``` and then you will get an array of all following parameters in `$params` But you will have to manually split the key-values apart
# Jul 25th 2021, 16:52 alamnaryab Hi All `http://project.com/guardians/add/student:61/other:21` how can I get named parameters in cake4?
# Jul 24th 2021, 23:22 jojomartius ->add(new ErrorHandlerMiddleware(Configure::read('Error'))) inestead of >add(ErrorHandlerMiddleware::class)
# Jul 24th 2021, 23:22 jojomartius got it!
# Jul 24th 2021, 23:12 jojomartius yes, thank you so much so far
# Jul 24th 2021, 23:05 kevin.pfeifer well i gotta get some sleep. maybe someone else can help till tomorrow :)
# Jul 24th 2021, 23:04 jojomartius especially since removing the middleware helps
# Jul 24th 2021, 23:03 kevin.pfeifer very strange indeed
# Jul 24th 2021, 23:03 jojomartius no also not consuming error's
# Jul 24th 2021, 23:03 jojomartius ah let me check my vendors
# Jul 24th 2021, 23:02 jojomartius nope, only consuming Cache,Datasources,EmailTransport, Email, Log and Security.salt
# Jul 24th 2021, 23:01 jojomartius which means ErrorHandlerMiddleware is not looking in the right config
# Jul 24th 2021, 23:01 kevin.pfeifer or do you have ```Configure::consume( 'Error' )``` somewhere?
# Jul 24th 2021, 23:00 jojomartius contains everthing
# Jul 24th 2021, 22:59 kevin.pfeifer maybe try outputting ``` Configure::read( 'Error' )``` in your Application.php in the middleware function and see if everything is still there
# Jul 24th 2021, 22:58 jojomartius mh no if i remove it from my bootstrap, its till rendering the expcetions - but its not takeing "skipLogs" into account ,:)
# Jul 24th 2021, 22:56 kevin.pfeifer in my bootstrap.php
# Jul 24th 2021, 22:56 kevin.pfeifer well I commented out ```( new ErrorHandler( Configure::read( 'Error' ) ) )->register();``` and it still worked
# Jul 24th 2021, 22:55 jojomartius but somehow it feels bad to remove the errorhandlermiddleware
# Jul 24th 2021, 22:55 jojomartius yes, indeed thats changing the behavior completly. removing ->add(ErrorHandlerMiddleware::class) helpts that the app.php is controlling the logging behavior
# Jul 24th 2021, 22:54 kevin.pfeifer not the thing in the bootstrap.php
# Jul 24th 2021, 22:54 kevin.pfeifer ok, its definitely the ErrorHandlerMiddleware in the Application.php which causes my logic
# Jul 24th 2021, 22:53 jojomartius i removed the error handler from application.php and the nit works
# Jul 24th 2021, 22:53 jojomartius but regarding https://github.com/cakephp/app/issues/842
# Jul 24th 2021, 22:53 jojomartius true taht
# Jul 24th 2021, 22:52 kevin.pfeifer well thats a bit too harsh in my opinion ^^ If your not in sync with the app template then I would just go file by file and check what differs
# Jul 24th 2021, 22:50 jojomartius but i guess the best way is just dropping the application into a seperate folder, starting with a new cakephp/app and migrating stuff over
# Jul 24th 2021, 22:50 kevin.pfeifer let me check something
# Jul 24th 2021, 22:50 jojomartius yes, you'r right. but i guess it came with 4.0 or something. too long ago
# Jul 24th 2021, 22:48 jojomartius but the bad part is... also if i clear the skip log thing
# Jul 24th 2021, 22:48 kevin.pfeifer well the Application.php is pretty important since it is used in literally the first php file loaded :) (webroot/index.php)
# Jul 24th 2021, 22:48 jojomartius hehe ya now its not writing it into the logfile :)
# Jul 24th 2021, 22:47 jojomartius i do remember that i somehow missed the point when the "Application.php" was introduced and i had some trouble to get it working, so maybe i did something stupid back in this days
# Jul 24th 2021, 22:46 jojomartius well.. guess that could be the problem
# Jul 24th 2021, 22:46 jojomartius but theres a lot of interesting stuff inside the "new" app
# Jul 24th 2021, 22:45 kevin.pfeifer which is not the problem here because I got that too