Log message #4261517

# At Username Text
# Apr 20th 2021, 08:45 nayakvradhit Can anyone please help how to call a function of controller in JavaScript src tag in. Ctp file?
# Apr 20th 2021, 05:17 conehead @rightscoreanalysis True, not sure where it went. You can still find the list here: https://github.com/cakephp/cakephp/blob/master/src/View/Helper/FormHelper.php#L88
# Apr 20th 2021, 03:32 davinci trying to run a shell script (cake 2.x), and it's saying it can't find a table that is definitely there. Have tried clearing tmp/model/ What else could I be missing?
# Apr 19th 2021, 22:31 rightscoreanalysis not sure if the link is wrong or the list has been moved
# Apr 19th 2021, 22:30 rightscoreanalysis But that list is no longer found in the linked resource https://api.cakephp.org/3.9/class-Cake.View.Helper.FormHelper.html#%24_defaultConfig
# Apr 19th 2021, 22:30 rightscoreanalysis "The list of default templates, their default format and the variables they expect can be found in the FormHelper API documentation."
# Apr 19th 2021, 22:30 rightscoreanalysis there use to be alink in the book to a list of the form template that can be modified in the app_form.php
# Apr 19th 2021, 19:24 hello106 Thanks Kevin, I’ll check those out more thoroughly, I’ve used them a little before but not heavily
# Apr 19th 2021, 19:11 kevin.pfeifer i just personally really like utility classes (and the way they integration with dependency injection)
# Apr 19th 2021, 19:10 kevin.pfeifer i would just recommend you to stick with one method and dont mix/match too much to micro-optimize
# Apr 19th 2021, 19:10 hello106 Thank you, I think the BasePolicy seems a good sounding route, it’s quite minor but grates on me having the function repeated - appreciate all the notes
# Apr 19th 2021, 19:09 kevin.pfeifer there is just no “predefined” way the authorization plugin / cakephp recommends you
# Apr 19th 2021, 19:08 kevin.pfeifer there are many ways to organize code :)
# Apr 19th 2021, 19:08 kevin.pfeifer or create a trait
# Apr 19th 2021, 19:08 kevin.pfeifer you could also create a `BasePolicy` which your needed Policies extend from
# Apr 19th 2021, 19:07 sebastiansperandio093 you could add a custom finder and get other data related to the user
# Apr 19th 2021, 19:02 hello106 Thank you @kevin.pfeifer - if its only looking at the User Identity, is that still where you would add it? (for info, it would all be based on the users role only)
# Apr 19th 2021, 19:00 kevin.pfeifer use a utility class
# Apr 19th 2021, 18:52 hello106 Would anyone have any advice on where best to put a function used across various entity policies (we’re using the Cake Authorization plugin)? Like the `isAuthor()` in the example https://book.cakephp.org/4/en/tutorials-and-examples/cms/authorization.html#creating-our-first-policy but that can be defined once and then used in multiple policy?
# Apr 19th 2021, 18:46 sebastiansperandio093 'serialize', ['data']
# Apr 19th 2021, 18:45 sebastiansperandio093 just in case, could you try to pass the second parameter as an array?
# Apr 19th 2021, 18:45 rightscoreanalysis ah: $this->request->getParam('controller')
# Apr 19th 2021, 18:44 rightscoreanalysis how can i get the current controller in v4, in 3 this worked $this->request->params['controller']
# Apr 19th 2021, 18:43 sebastiansperandio093 mmm
# Apr 19th 2021, 18:15 Bob21 still no response
# Apr 19th 2021, 18:14 Bob21 I will try that
# Apr 19th 2021, 18:11 sebastiansperandio093 did you trying removing html code from data?
# Apr 19th 2021, 17:49 Bob21 and my response is looking for the /json/[action]/update.php
# Apr 19th 2021, 17:48 Bob21 $this->viewBuilder()->setOption('serialize', 'data');
# Apr 19th 2021, 17:48 Bob21 $this->set('data', $data);
# Apr 19th 2021, 17:48 Bob21 $data = ["error"=>"<span class='error'><strong>Error!</strong> Action not permitted!</span>"];
# Apr 19th 2021, 17:47 Bob21 $this->viewBuilder()->setOption('serialize', 'data');
# Apr 19th 2021, 17:47 Bob21 $this->set('data', $data);
# Apr 19th 2021, 17:47 Bob21 $data = ["error"=>"<span class='error'><strong>Error!</strong> Action not permitted!</span>"];
# Apr 19th 2021, 17:47 Bob21 This function returns blank in my ajax request
# Apr 19th 2021, 17:46 Bob21 I have a problem with Using Data Views with the Serialize Key
# Apr 19th 2021, 17:45 Bob21 Hello
# Apr 19th 2021, 17:30 cnizzardini I don't have any experience with migration templates. Have you looked at the closed/open issues on https://github.com/cakephp/migrations/issues ?
# Apr 19th 2021, 15:09 slackebot `plugins/MyTheme/templates/bake`, if doing something like `bin/cake bake migration CreateFoo -t MyTheme`. It's not like themes for migrations are silently deprecated or something? ,:)
# Apr 19th 2021, 15:09 slackebot alltogether; the TemplateRenderer does not get a theme sent to the constructor, the template given to `$renderer->generate()` in the bake command is a hardcoded `Migrations.config/skeleton` , which cannot be changed since you'll immediately get errors for non-existing templates. Before I go even further down the rabbit hole; baking migrations _should_ still support themes, right? And those files should be located in
# Apr 19th 2021, 15:09 tunafish Hi! We upgraded our API to Cake4.x last year, but at the time couldn't get our theme for baking migrations working again. We left it alone then, because other issues and stuff, but we still really would like to have our theme back. So, we updated the templates and placed them in the appropriate location, but it never works. I dove into the code of `cakephp/migrations` itself, and it looks like it's just ignoring themes