Logs for #cakephp

Page 1 of 36,163, showing 100 records out of 3,616,255 total, starting on record 1, ending on 100

# At Username Text
# Today, 06:40 sab nnn
# Today, 06:40 sab moring
# Today, 06:30 madbbb Good Morning!
# Today, 05:42 conehead Personally I am passing the data to the view. I think it is more important if you show the data the same way somewhere else and not just on a single page
# Today, 05:39 sab okay, appreciate the input
# Today, 05:38 niel45 that's if you want to do the accessing in the template. You could also use elements with the controller passing the data into it. Really depends how you want to do it ;-)
# Today, 05:37 niel45 if you need access to your models, you'd probably want to use cells
# Today, 05:34 sab Or none of it
# Today, 05:33 sab Hi, just a short question: If I'd like to create a dashboard, would I do that with cells or elements?
# Yesterday, 19:44 jeremyharris oh, there ya go ;)
# Yesterday, 19:44 jeremyharris this error is saying you are using Query::join as a getter but it doesn’t work as one anymore. You should find any places in your app using Query::join to read the join (rather than set it) and upgrade to Query::clause
# Yesterday, 19:44 madbbb ha-ha. it is Query::clause("join")
# Yesterday, 19:36 madbbb upgrading my cake to 3.7 and stuck with ```Using Query::join() to read state is deprecated. Use clause("join") instead.``` where do I put that clause?
# Yesterday, 19:35 dereuromark the quickest one. if you need it, sure. u can also have many workers this way.
# Yesterday, 19:12 challgren Start every minute?
# Yesterday, 19:11 dereuromark i use 2 min interval and shorter life span. always 3 parallel. depends on the max running task.
# Yesterday, 18:44 challgren This is my config and I have a crontab that starts `bin/cake queue runworker` every 10 minutes, So I always have 2 queue running at one time
# Yesterday, 18:44 joey.mukherjee Thank you so much!! The line I was missing was use Queue\Shell\Task\QueueTask;
# Yesterday, 18:43 joey.mukherjee Oh wow, I didn't know I could click on it. Cool. Thank you!
# Yesterday, 18:42 challgren You queue table might have bad jobs in it too
# Yesterday, 18:42 challgren Follow my sample I just posted, it works fine for me and I have no issues
# Yesterday, 18:41 joey.mukherjee No, I had `namespace Queue\Shell\Task;` at the start. When I put App instead of Queue, I get "Class 'App\Shell\Task\QueueTask' not found "
# Yesterday, 18:40 challgren This is my sample job called ‘SendCustomer’
# Yesterday, 18:40 challgren Does the file have `namespace App\Shell\Task;` at the start?
# Yesterday, 18:39 joey.mukherjee Yes! I have that! I think I am doing that part right. However, it only works if I put it under vendors.. with the other examples. :( I am trying to move it in my source tree.
# Yesterday, 18:37 challgren $queue->createJob(‘Movie’, $data, [‘group’ => ‘email’, ‘reference’ => $entity->get(‘id’)]);
# Yesterday, 18:37 challgren Your job name when creating the is Movie
# Yesterday, 18:36 joey.mukherjee My file is called QueueMovieTask.php and is in /src/Shell/Task. But when I run cake queue, I get "Exception: Task `QueueMovie` not found". My namespace is Queue\Shell\Task, and I have "class QueueMovieTask extends QueueTask {" at the start. Is one of those wrong?
# Yesterday, 18:22 challgren Your Task also needs to be named QueueMyCustomJobTask
# Yesterday, 18:21 challgren @joey.mukherjee https://github.com/dereuromark/cakephp-queue/tree/master/docs#writing-your-own-task
# Yesterday, 18:18 joey.mukherjee Thanks all for your help on my queue issues. I just went with cron and have it checking every minute. Anyway, I made a Queue task using dereuromark/cakephp-queue. However, the only way it works is if I put it in vendor/dereuromark/cakephp-queue/src/Shell/Task. The docs say to put it in src/Shell/Task, but it isn't found if I put it there. Any ideas on what I am doing wrong?
# Yesterday, 17:23 daniel.upshaw Thanks @admad
# Yesterday, 17:21 daniel.upshaw It's a bit confusing confusing
# Yesterday, 17:21 daniel.upshaw I think that does it though
# Yesterday, 17:21 daniel.upshaw That works in `beforeRender`, and not in the public method
# Yesterday, 17:20 daniel.upshaw Wooot! `$this->RequestHandler->renderAs($this, null);`
# Yesterday, 17:19 admad apparently it skips setting the templatepath if you have already set view classname. So try doing that in your action method
# Yesterday, 17:18 daniel.upshaw Hmm `_renderType`
# Yesterday, 17:18 admad https://github.com/cakephp/cakephp/blob/master/src/Controller/Component/RequestHandlerComponent.php#L631=L639
# Yesterday, 17:17 daniel.upshaw Thank you for the input though, it just isn't taking for some reason
# Yesterday, 17:17 daniel.upshaw Ah
# Yesterday, 17:17 admad it has nothing to do with view class name
# Yesterday, 17:14 daniel.upshaw ```object(Cake\View\ViewBuilder) { [protected] _templatePath => 'Admin/MenuLinks/ajax' [protected] _template => null [protected] _plugin => null [protected] _theme => 'CoreManager' [protected] _layout => null [protected] _autoLayout => null [protected] _layoutPath => 'ajax' [protected] _name => null [protected] _className => 'App' [protected] _options => [] [protected] _helpers => [ (int) 0 => 'CoreManager.Core' ]
# Yesterday, 17:14 slackebot [protected] _vars => [] }```
# Yesterday, 17:14 daniel.upshaw Wow even if I `$this->viewBuilder()->setClassName('App')`
# Yesterday, 17:12 daniel.upshaw Could be `setClassName()` perhaps
# Yesterday, 17:11 daniel.upshaw Putting it in `beforeRender()` did at least have an effect.. thanks for the input though, I can keep tinkering with this
# Yesterday, 17:10 daniel.upshaw @admad Interestingly, even forcing the path to `$this->viewBuilder()->setTemplatePath('Admin/MenuLinks');`, it adds the `ajax` subfolder to that
# Yesterday, 17:09 daniel.upshaw I'll try that to test
# Yesterday, 17:09 daniel.upshaw Although then it might be for the whole controller
# Yesterday, 17:09 admad beforeRender
# Yesterday, 17:09 daniel.upshaw Maybe I need it in a beforeFilter method
# Yesterday, 17:08 daniel.upshaw The `debug` call does say `null`
# Yesterday, 17:08 daniel.upshaw Also tried an empty string `''`, and double checking `debug($this->viewBuilder()->getTemplatePath());`
# Yesterday, 17:08 daniel.upshaw @admad That seems like it would be perfect... did try in the `index()` method setting `$this->viewBuilder()->setTemplatePath(null);` but it still tries to fetch the `ajax` subfolder
# Yesterday, 16:52 admad @daniel.upshaw RequestHandler sets the template path to `ajax` subfolder. Use `viewBuilder()->setTemplatePath()` to reset it to `null`.
# Yesterday, 16:36 daniel.upshaw What if you want to request the HTML page like the normal route?
# Yesterday, 16:36 daniel.upshaw An AJAX call with jQuery.... Cake is requiring a separate `/ajax/index.ctp`, with a layout when it detects an AJAX call
# Yesterday, 16:35 slackebot <daniel.upshaw>
# Yesterday, 16:35 daniel.upshaw Here's something super annoying
# Yesterday, 16:17 daniel.upshaw Lol darn
# Yesterday, 16:17 daniel.upshaw Oy
# Yesterday, 16:17 a.didier i see... I'm on a really old project and i'm not really used to Cake2 and the previous dev did some weird stuff XD Hard to understand
# Yesterday, 16:15 daniel.upshaw `app/View/Recipes/search.ctp`
# Yesterday, 16:15 daniel.upshaw `app/View/Recipes/share.ctp`
# Yesterday, 16:15 daniel.upshaw `app/View/Recipes/view.ctp`
# Yesterday, 16:15 daniel.upshaw So each of `view`, `share`, `search` generates a response
# Yesterday, 16:15 daniel.upshaw ```# /app/Controller/RecipesController.php class RecipesController extends AppController { public function view($id) { //action logic goes here.. } public function share($customerId, $recipeId) { //action logic goes here.. } public function search($query) { //action logic goes here.. } }```
# Yesterday, 16:14 daniel.upshaw Controller should automatically generate a response, but you can customize it first if you need to
# Yesterday, 16:14 daniel.upshaw The response is probably from here: https://book.cakephp.org/2.0/en/controllers.html
# Yesterday, 16:13 daniel.upshaw So it would already know about `json` for example, so `type->('json')` is already prepared whereas as `vcf` needs `$this->response->type(array('vcf' => 'text/v-card'));` to be set first
# Yesterday, 16:13 daniel.upshaw Although in the example, that's a custom one
# Yesterday, 16:12 daniel.upshaw So by setting `type->('vcf');`, it's just adding the `text/v-card` MIME type to the headers
# Yesterday, 16:12 daniel.upshaw @a.didier I think you can still use a template with a different response type
# Yesterday, 16:02 a.didier Hello, quick question : I want to use CakeResponse on Cake2.10 but i have no idea on how to load it... The book show small code like this `$this->response->type('vcf');` nothing on how response is set...
# Yesterday, 15:01 jeremyharris I believe the Croogo CMS has visual ACLs. I haven’t looked at it in a while but that might be a good example if they still have it
# Yesterday, 14:59 feLiruc Hello guys... I need to implement ACL in a visual way for CakePHP 3.7, do you guys have any good source or tutorial to do that?
# Yesterday, 14:03 jeremyharris I’m glad you got it working. I’ll try and set aside some time this week to see if I can make it automatically restore existing handlers somehow
# Yesterday, 14:03 jeremyharris I don’t remember at the moment to be honest. I think all known cake-related state is cleaned so that the test cases have a clean state to work with
# Yesterday, 13:27 madbbb what is the purpose of EventManager cleaning in default test case setUp() method? I don't get it. As you said I rewrote the setup method and now it works. thank you
# Yesterday, 13:23 jeremyharris so your bootstrap will be run when the initial test suite runs, but you’ll need to re-add them in TestCase::setUp (I usually have a base test case class to do this in) so they are added for each test thereafter
# Yesterday, 13:22 jeremyharris sorry, your test case setup I mean
# Yesterday, 13:21 madbbb but I have require dirname(__DIR__) . '/config/bootstrap.php'; in my test bootstrap.php
# Yesterday, 13:20 jeremyharris I think restoring them automatically might be possible, but I haven’t looked into it too much to set up a PR yet
# Yesterday, 13:19 jeremyharris @madbbb you need to add them to your test bootstrap too; that’s what I do.
# Yesterday, 13:09 madbbb TestCase.php creates new instance of EventManager in setUp() method. That is why I have no listeners anymore
# Yesterday, 12:59 gourav Please give idea how I can fix this.
# Yesterday, 12:59 gourav I am getting issue with two cake php versions 1.3 and 3.3, I want to login into cake 3.3 from 1.3 with manual auth setting, but It's not working I am using the curl for this purpose,
# Yesterday, 12:57 gourav Hi EveryOne,
# Yesterday, 12:57 madbbb but EventManager has no listeners in my models.
# Yesterday, 12:51 madbbb Hello. When I run tests my event listeners do not receive events. Is there some additional setup needed for them to work in test environment? I initialise them in bootstrap.php like this: ``` $listeners = [ App\Event\InvoiceListener::class, App\Event\OrderListener::class, App\Event\TransactionListener::class ]; foreach ($listeners as $listener) { EventManager::instance()->attach(new $listener()); } ``` look like they are not
# Yesterday, 12:51 slackebot initilizng in test env
# Yesterday, 11:15 slackebot 'cascadeCallbacks' => true, ]); And ControllableObject have the Behavior as: $this->addBehavior('Muffin/Trash.Trash'); When i delete a ControllableObject, the behavior add only the timestamp on this table, and the relationships table are ignored :S, someone can help?
# Yesterday, 11:15 peppejaripappalardo Hi all, just a little question about Muffin/Trash soft-delete. I have these table: ControllableObjects => AbstractResources => Resources => Volunteers. When i delete a ControllableObject, it have to delete a cascade Abastract, Resources, Volunters. At this time these table have the ForeignKey as is required by the plugin. Every have the behavior with: $this->addBehavior('Muffin/Trash.Trash', [ 'dependent' => true,
# Yesterday, 11:04 adithya why is withFile prepending to the path provided?
# Yesterday, 11:03 adithya $file_path = WWW_ROOT.'img/file.txt'; $response = $this->response->withFile($file_path); I'm trying to serve this file but the url generated by the withFile is /users/demouser/websites/cakeproject1/src//users/demouser/websites/cakeproject1/webroot/img/file.txt what am i doing wrong?
# Yesterday, 11:01 unclezoot i think this line is the problem ShellDispatcher::addShortPluginAliases(265). $aliases += [$shell => $plugin]; as it assumes that you will never have 2 shells with the same name
# Yesterday, 11:00 vossen.steven it doesnt though since it checks if the plugins are the same
# Yesterday, 10:59 adithya $file_path = WWW_ROOT.$path; $response = $this->response->withFile($file_path);
# Yesterday, 10:52 unclezoot seems to be all sorts of array_flipping going on in there: $fixed = array_flip($list['app']) + array_flip($list['CORE']);, so if you have a shell called Reporting.utilities and Search.utilities say, then you'll fill up your debug.log in no time