Log message #4209661

# At Username Text
# Oct 19th, 13:43 ndm The path is still wrong, all keys need an index ;) Anyways, by default only first level associations are patched and saved, for deeper associations you need to explicitly allow them using the `associated` option for patching and saving, maybe that's your problem.
# Oct 19th, 13:35 kailas I’m trying to create an entity A and B (and existing C) where : A has many B and B BelongsToMany C. in my patch entity array i include the a.b[0].c._joinData.stuff values. On my save, A and B are created, but the join table entities between B and C are not created (from the _joinData data). is that even possible?
# Oct 19th, 12:54 admad When I am faced with such a situation I usually just keep mum :slightly_smiling_face:
# Oct 19th, 12:39 alexdd55976 I would, but I have no experience with all that :,)
# Oct 19th, 12:33 admad In case anyone wants to weight in on this your thoughts are welcome https://github.com/cakephp/cakephp/pull/13766
# Oct 19th, 12:18 loginews @alex. thanks. something else must be wrong. I will investigate.
# Oct 19th, 11:28 alexdd55976 @loginews no, there is no cache. You can see the entries instantly in the database.
# Oct 19th, 09:54 arif.h how to use form element in cake
# Oct 19th, 09:26 loginews Is there then a cache which I have to flush somewhere ?
# Oct 19th, 09:25 loginews My use of cakephp is more or less limited to crud screens generated by the bake utility.
# Oct 19th, 09:24 loginews I had this situation a couple of times. When I tried to look into the problem, the latter disappeared.
# Oct 19th, 09:23 loginews Part of my application is written in pure php.
# Oct 19th, 09:21 loginews as for me, I used cakephp to input data, but it seems that pure php does not see the entries immediately. Is there a cache in cakephp that I should flush somewhere ?
# Oct 19th, 07:42 MaTTze I read in the docs I have to load the TwigView Plugin with boostrap and tried to add it in my Application.php but that didn't help.
# Oct 19th, 07:41 MaTTze Hi guys, maybe someone of you can help me. I started with a fresh cakephp-app-skeleton project and wanted to use bake. But I get an error 'Unknown "as_array" filter'.
# Oct 19th, 02:42 night_wulfe I realize it's a broad question, but any tips would help.
# Oct 19th, 02:39 slackebot1 necessarily when to do it or what should go where.
# Oct 19th, 02:39 slackebot1 to custom finders and save methods? How do you avoid making the custom find methods extremely complex trying to deal with all the possible options (conditions, fields, count, order, etc) that a user can pass in? Likewise, I feel like the model will end up with dozens of saveBySomeThing() methods to deal with all the variances in how something could be saved. Are there any guidelines available? The book seems to say how to do all this, but not
# Oct 19th, 02:39 night_wulfe I have a legacy CakePHP 2.x app that I'm maintaining and have an opportunity to refactor some code. Migrating to 3.x is on the road map, but not something I can do right now due to the size of the application. One of the things that seems wrong to me is the controllers all use find() and save() directly. There are no custom find/save methods and as a result a lot of duplicate code and logic in the controllers. Should all this be moved
# Oct 18th, 20:59 ricksaccous etc etc
# Oct 18th, 20:59 ricksaccous Are you sure you're using the right .ctp file
# Oct 18th, 20:59 ricksaccous @ron.rattie are you displaying the fetched content in the layout? are you sure your plugin is using the regular layout? Are you spitting out things in the actual .ctp file?
# Oct 18th, 20:21 ron.rattie Nothing, the opposite of something. Well the layout pieces I’m the default show but that’s it. I know I’m missing something basic here, but I just back to working in this today
# Oct 18th, 20:14 ricksaccous what do you mean by nothing shows?
# Oct 18th, 20:11 ron.rattie Okay so new question, I'm using the app default.ctp as the layout for the site and when I go to /audit-trail/logs nothing shows but debugkit shows the variable is there, is there something I need to put in the default.ctp to display plugin content?
# Oct 18th, 19:35 ron.rattie But it's the top of the routes now
# Oct 18th, 19:35 ron.rattie Feels odd putting the: Router::plugin( 'AuditTrails', ['path' => '/audit-trails'], function ($routes) { $routes->connect('/logs', ['controller' => 'Logs']); } ); In the main routes.php
# Oct 18th, 19:23 holisticnetworking Is it possible to query a Model from inside a Behavior? I need to ensure that a companion record lives in two tables in a database upon saving or updating?
# Oct 18th, 19:10 ron.rattie I'm getting closer I would suppose.
# Oct 18th, 18:56 daniel.upshaw You could try moving `Plugin::routes();` closer to the top of your app's `routes.php` before the others
# Oct 18th, 18:54 daniel.upshaw Yah
# Oct 18th, 18:54 ndm Look at route number 3 and 4, they are catch all routes, number 4 specifically will catch your URL. That's most likely in your main routes config file.
# Oct 18th, 18:54 daniel.upshaw I wonder if that `_controller:index` route is catching it
# Oct 18th, 18:53 daniel.upshaw Yeah it does look right
# Oct 18th, 18:52 daniel.upshaw Sorry, hmm
# Oct 18th, 18:52 daniel.upshaw Oh
# Oct 18th, 18:52 daniel.upshaw @ron.rattie Probably should be `class AuditTrailsController`
# Oct 18th, 18:52 slackebot1 <ron.rattie>
# Oct 18th, 18:52 ron.rattie Okay.. updated the routes to use scope instead of get and I see these:
# Oct 18th, 18:51 daniel.upshaw @ndm, looks like a handy CLI function, nice
# Oct 18th, 18:21 ndm You probably have other routes that are catching the URL. Use the routes shell (`bin/cake routes`) to get a list of routes in the connected order.