Log message #4264178

# At Username Text
# May 28th 2021, 18:39 etibor i tried to dicide if the page extension has pdf content-type by get_header
# May 28th 2021, 18:39 ndm Sure, but by default the regular view and the PDF view use different templates, the one's for the PDF live in the `pdf` subfolder.
# May 28th 2021, 18:38 etibor @ndm the pdf is more colorful than the pdf, the normal view is just a simple table, while pdf have colored thead for example
# May 28th 2021, 18:37 st.steinkuehler @steinkel setting the table for the CakeDC User plugin in `Application::pluginBootstrap` with `Configure::write('Users.table','Administrators')` should work? I removed the `role` from `$_accessible` in the Adminstrator Entity because I want to set the role from the frontend - but it only works for me if the table is set in the `config/users.php` .
# May 28th 2021, 18:37 ndm Why do you need to use different template names in the first place? What problem is that trying to solve=
# May 28th 2021, 18:36 etibor i have to difine somehow if the extension is pdf than use template for pdf
# May 28th 2021, 18:36 etibor unfortunately i have different template file for normal view and for the pdf
# May 28th 2021, 18:35 etibor thank you @ndm that could be almost good
# May 28th 2021, 18:28 ndm Use the view builder's `setTemplate()` method.
# May 28th 2021, 18:23 etibor do you have any hint please
# May 28th 2021, 18:23 etibor @admad
# May 28th 2021, 18:23 etibor but it does not change
# May 28th 2021, 18:23 etibor `$this->getController()->viewBuilder()->setOptions([` `'pdfConfig' => [` `'template'=>'pdf_template'`
# May 28th 2021, 18:22 etibor basically its uses the same as the template name
# May 28th 2021, 18:21 etibor in cakepdf how can i change the template file for pdf?
# May 28th 2021, 18:21 etibor hello all
# May 28th 2021, 17:26 st.steinkuehler Now I understood: the CakeDC plugin is loading the file from `config/` if the config key + value is set...sorry
# May 28th 2021, 17:04 st.steinkuehler At the moment I do not have an issue. I want to understand. If I have an solution for my needs with your `Application::pluginBootstrap` hint than I can send a PR for the CakeDC documentation...
# May 28th 2021, 17:01 st.steinkuehler The CakeDC documentation (page "Installation") is clear, becaus it works. But I do not understand why `Configure::load` has not been used and it does not work with `Configure::load('users','Users.config')`
# May 28th 2021, 16:46 chris301 Thanks mate that's the one I wanted :)
# May 28th 2021, 16:38 steinkel or send a PR to the file with an example of your issue and how you fixed it, it'll help others in the same situation, thanks!
# May 28th 2021, 16:37 steinkel we can add that to the documentation for sure!
# May 28th 2021, 16:36 st.steinkuehler @steinkel OK, I get it, but isn't it documented? Thanks for the hint to override - that's exactly what I wanted and that's why I tried to understand the config loading of the CakeDC plugin better.
# May 28th 2021, 16:33 slackebot more asking on how to group the data together using the Form helper
# May 28th 2021, 16:33 tyler.adam.lazenby sugggestion request: How would you go about creating a form to with migration from a old data structure to a new one. I had been using users as the "account" but now I need to make it so that accounts are collections of users. Additionally I need to add addresses. Luckily there aren't a lot of users yet, otherwise that will make it harder. We also don't have any users that we currently need to group together. I am
# May 28th 2021, 16:29 steinkel if you need to override these settings after plugin load, you can use the `Application::pluginBootstrap` method
# May 28th 2021, 16:29 steinkel that's a way to name an array of files and get them loaded, and merged into the configuration
# May 28th 2021, 16:27 st.steinkuehler Hello, in the CakeDC User documentation the file "config/users.php" is loaded with this code `Configure::write('Users.config', ['users']);` into the configuration - but I can find anything in the API-Doc or Book about this file loading behavior of `Configure::write`. Can someone explain? Thanks.
# May 28th 2021, 15:18 shahways Thanks @admad, will do so. Have a nice weekend!
# May 28th 2021, 14:56 admad Please open an issue on github.
# May 28th 2021, 14:55 admad @shahways That's a bug with bake. The unique check should be in build rules only not validation.
# May 28th 2021, 14:49 st.steinkuehler Thanks
# May 28th 2021, 14:48 ndm Very likely.
# May 28th 2021, 14:40 st.steinkuehler Hello, I want to add a parameter into a post request comming from the browser before it reaches the plugin controller code. Is a middleware the right place to do this?
# May 28th 2021, 13:55 ndm `assertEventFiredWith()`?
# May 28th 2021, 13:37 chris301 hi guys, i’m currently working on something where i have dispatched a custom Event, and would like to assert that the specific event dispatched has the content i expect it to, but am struggling to find a way of searching for the event in the EventList other than using getOffset(). is there a method i haven’t found yet that would allow me to search for a particular event in the event list in tests?
# May 28th 2021, 13:18 neon1024 there it is
# May 28th 2021, 13:18 neon1024 https://github.com/cakephp/cakephp/blob/2.10.24/lib/Cake/Routing/Router.php#L65-L71
# May 28th 2021, 13:17 neon1024 You could check the Routing class in your project to see if it supports prefixes
# May 28th 2021, 13:17 neon1024 @rightscoreanalysis It’s been a long time since I used Cake 2, but I think prefixes still existed back then
# May 28th 2021, 12:04 etibor i thought you were asking the prefixes