Logs for #cakephp

Page 1 of 36,478, showing 100 records out of 3,647,725 total, starting on record 1, ending on 100

# At Username Text
# Today, 09:00 gianmarxgagliardi morning all
# Today, 00:45 challgren Can you put your table so we have a complete gist
# Today, 00:22 luizcmarin update, pardon
# Today, 00:19 challgren Im not seeing your controller at all you have a file named controller but its a table
# Today, 00:14 luizcmarin https://gist.github.com/LuizMarin/9c7c9ede4251a3c8f96ddc645255e585
# Today, 00:13 challgren And access is via $this->StiCaixas
# Today, 00:12 challgren You just need to set the $modelClass as the STI table
# Today, 00:12 challgren You can name the controller whatever you want
# Today, 00:12 luizcmarin or CaixaController ?
# Today, 00:11 luizcmarin @challgren StiCaixaController? (it's real table)
# Yesterday, 23:38 challgren By default Cake is autoloading Caixa based on the controller name so you need to override the `$modelClass = 'StiCaixas';` in your controller
# Yesterday, 23:33 slackebot Command sent from Slack by challgren:
# Yesterday, 23:33 slackebot !gist
# Yesterday, 23:33 challgren Do a gist of your controller I'll show you. Do it on GitHub so I can fork it
# Yesterday, 23:33 challgren It's the same as $this-loadModel() in your controller
# Yesterday, 23:31 challgren Ok override the $modelClass in your controller with the sticaixa table class name
# Yesterday, 23:20 luizcmarin @challgren you understood well. So far I believe I have done everything right. But from there ..... I create a CaixaController, ContasPagarController, ContasReceberController? I created a CaixaController. He says' it doesn't exist in the database ". And it doesn't, he is right. I did not find HOW to make the menus and the screens. It is this side that I read all the material you gave me and tried to get the logic, ... but the cook here
# Yesterday, 23:20 slackebot burned everything ... Then I started again from the beginning. It was then that I became convinced that this kind of thing cannot be done without real cooks. _* Realize that I don't write asking anything without making several attempts beforehand. I've dealt with support a lot and I know how stressful it is._
# Yesterday, 21:58 challgren @cakephp-slack does your /bin/cake.php match https://github.com/cakephp/app/tree/master/bin/cake.php?
# Yesterday, 21:49 challgren Those types being Caixa, Caixapagar, Caixareceber, stored in the type column of your sti_caixas table in mySQL
# Yesterday, 21:47 challgren @luizcmarin from my understanding you want to have 1 table with 3 different “types” stored? Those types are then converted by the ORM into Entities that are different? Is that correct?
# Yesterday, 21:32 luizcmarin STI....
# Yesterday, 21:05 latenal Hi! I am trying to integrate a JWT authentication using the `Authentication` plugin. I read the docs and I don’t quite understand how it works. ``` public function login() { $this->request->allowMethod(['get', 'post']); $result = $this->Authentication->getResult(); if (!$result->isValid()) { throw new ForbiddenException(__('The username and password don\'t match.')); } }```
# Yesterday, 20:17 luizcmarin @challgren Excuse me. I started the STI all over again. It is impossible to continue alone without overloading the support. Difficult to implement with readme.md and does not explain how to continue. I tried every dumb way I know. I will think of alternatives.
# Yesterday, 12:30 alexdd55976 its cake 3.6
# Yesterday, 12:29 alexdd55976 `NOT IN`??
# Yesterday, 12:29 alexdd55976 am i wrong with the statement?
# Yesterday, 12:29 alexdd55976 there are tracking_ids in the variable.
# Yesterday, 12:27 alexdd55976 but get this `Impossible to generate condition with empty list of values for field (tracking_id)`v
# Yesterday, 12:27 alexdd55976 trying to do this ```$Times->deleteAll([ 'Times.model_id' => 7, 'Times.model_primary_key' => $entity->id, 'Times.tracking_id NOT IN' => $tracking_ids ]);```
# Yesterday, 12:27 alexdd55976 hey fellows
# Yesterday, 10:24 challgren @luizcmarin we updated the README.md to include setTable instead of table. Also you may want to be looking at https://github.com/UseMuffin/Sti/tree/cake-4.x as thats more specific to Cake 4 and the master branch is for 3.6+
# Yesterday, 00:27 luizcmarin very complex, I am confused and tired. Tomorrow I try to start again. The plugin is good, congratulations to those who did it. But my knowledge and ability to understand are greatly reduced. Thanks for the help @challgren. Willing people like you and some of the support is what dignifies the "kitchen of the cake". Good evening.
# Jan 24th, 23:44 luizcmarin examinando
# Jan 24th, 23:43 challgren The tests show you how to use it in a more technical sense and what to expect
# Jan 24th, 23:39 luizcmarin mamma mia.... moment, muuuch moments :tired_face:
# Jan 24th, 23:33 challgren https://github.com/UseMuffin/Sti/blob/master/tests/TestCase/Model/Behavior/StiBehaviorTest.php#L36
# Jan 24th, 23:33 challgren https://github.com/UseMuffin/Sti/blob/master/tests/test_app/Model/Table/CooksTable.php
# Jan 24th, 23:32 challgren https://github.com/UseMuffin/Sti/blob/master/tests/TestCase/Model/Behavior/StiBehaviorTest.php#L46
# Jan 24th, 23:30 challgren Yes, you just need to use the sti_caixas table to do your queries. The find/get will return the corrected entity type
# Jan 24th, 23:29 luizcmarin but can i create a menu for each type? and the screens too?
# Jan 24th, 23:28 challgren You wont have tables called caixa, caixapagar, and caixareceber. Those are entities. The sti_caixas table is what holds your data
# Jan 24th, 23:27 luizcmarin now i'm really confused. Give me time to understand your concept and test it out.
# Jan 24th, 23:24 challgren and add conditions => [‘type’ => ‘caixa’] to your paginate
# Jan 24th, 23:23 challgren Yes so you need to change your $modelClass in your controller to be StiCaixas
# Jan 24th, 23:23 luizcmarin it's in StiCaixasTable: _public_ _function_ _initialize_(_array_ _$config_)_:_ _void_     {         _parent::initialize_(_$config_);         _$this->setTable_('sti_caixas');         _$this->setDisplayField_('id');         _$this->setPrimaryKey_('id');         _// sti_          _$this->addBehavior_('Muffin/Sti.Sti', [             'typeMap' _=>_ [          
# Jan 24th, 23:23 slackebot       'caixa' _=>_ 'App\Model\Entity\Caixa',                 'caixapagar' _=>_ 'App\Model\Entity\CaixaPagar',                 'caixareceber' _=>_ 'App\Model\Entity\CaixaReceber',             ]         ]);         _$this->setEntityClass_('App\Model\Entity\Caixa'); _// default_
# Jan 24th, 23:22 challgren You need to use the StiTable you attached the behavior to
# Jan 24th, 23:21 luizcmarin _public_ _function_ _index_()     {         _$this->paginate_ _=_ [             'contain' _=>_ ['Pessoas', 'PlanoContas', 'Pedidos'],         ];         _$Caixas_ _=_ _$this->paginate_(_$this->Caixas_);         _$this->set_(compact('Caixas'));     }
# Jan 24th, 23:21 luizcmarin I created CaixasController.
# Jan 24th, 23:20 challgren Ok so your reading data, whats that call to read the data?
# Jan 24th, 23:16 luizcmarin when I try to access http: // localhost: 8765 / caixas
# Jan 24th, 23:15 challgren What is causing the error are you trying to save, trying to read?
# Jan 24th, 23:14 slackebot " Shouldn't he go to sti_caixas?
# Jan 24th, 23:14 luizcmarin excuse me. I was writing the situation. $this->setTable('sti_caixas'); ------> THIS TABLE IS REAL $this->setDisplayField('id'); $this->setPrimaryKey('id'); // sti $this->addBehavior('Muffin/Sti.Sti', [ 'typeMap' => [ 'caixa' => 'App\Model\Entity\Caixa', ------> THIS TABLE IS NOT REAL 'caixapagar' => 'App\Model\Entity\CaixaPagar',
# Jan 24th, 23:14 slackebot ------> THIS TABLE IS NOT REAL 'caixareceber' => 'App\Model\Entity\CaixaReceber', ------> THIS TABLE IS NOT REAL ] ]); $this->setEntityClass('App\Model\Entity\Caixa'); // default I created the entities box, box, box and box. I created the add, edit, view, index screens. However, I get the following error: " SQLSTATE [42S02]: Base table or view not found: 1146 Table 'ola_ney.caixas' doesn't exist
# Jan 24th, 23:12 challgren @luizcmarin please stop saying it has errors and not including what the error thats not very conductive to figuring out your issue.
# Jan 24th, 23:11 cakephp-slack I’m having an issue with migrations in a fresh CakePHP 4 install: ```$ bin/cake bake migration_snapshot Initial Creating file /home/vagrant/code/config/Migrations/20200124230841_Initial.php Wrote `/home/vagrant/code/config/Migrations/20200124230841_Initial.php` Marking the migration 20200124230841_Initial as migrated... Exception: Shell class for "Migrations" could not be found. If you are trying to use a plugin shell, that was
# Jan 24th, 23:11 slackebot loaded via $this->addPlugin(), you may need to update bin/cake.php to match https://github.com/cakephp/app/tree/master/bin/cake.php In [/home/vagrant/code/vendor/cakephp/cakephp/src/Console/ShellDispatcher.php, line 332]``` The migrations seems to be created successfully but marking it as done generates an error.
# Jan 24th, 22:58 luizcmarin I followed all the guidelines of the STI. At least, I believe so. But I have doubts because of some errors
# Jan 24th, 22:56 luizcmarin @challgren disponible?
# Jan 24th, 21:43 wnasich @challgren thanks!
# Jan 24th, 21:42 challgren https://github.com/burzum/cakephp-service-layer might be useful to you @wnasich you might need to update it for cake4
# Jan 24th, 21:42 wnasich ops, thanks!
# Jan 24th, 21:32 kiwi_74 @wnasich Thanks. That's what I was looking for :)
# Jan 24th, 21:30 wnasich Hello, with CakePHP 4 , is there a easy way to implement a service layer ?
# Jan 24th, 21:30 wnasich now you have the shell command `cake bake`
# Jan 24th, 21:28 wnasich maybe that was the 'scaffolding' feature on previous releases
# Jan 24th, 21:16 kiwi_74 Hello Everyone. I seem to remember cake being able to create default views which showed the rows of a table, but I can't find any info on it. Is there such a thing, or am I just imagining it, lol?
# Jan 24th, 19:51 challgren Also close https://github.com/UseMuffin/Sti/issues/8 since you figured it out
# Jan 24th, 19:49 challgren You can do a PR
# Jan 24th, 19:37 luizcmarin @challgren I find other differences between what is on the website and cake 4. How can I report this? Should I report? for example, on the website it says "$ this-> table ('sti_cooks');" but in cake4 it should be "$ this-> setTable ('sti_cooks');", do you agree? There is no way to suggest the changes I encounter.
# Jan 24th, 19:27 luizcmarin @challgren Everything is OK. Let's work ..... thanks
# Jan 24th, 19:25 luizcmarin :hugging_face:
# Jan 24th, 19:25 slackebot <luizcmarin>
# Jan 24th, 19:23 challgren sorry drop the use part
# Jan 24th, 19:22 luizcmarin [InvalidArgumentException] Could not find a matching version of package usemuffin/sti. Check the package spelling, your version cons traint and that the package is available in a stability which matches your minimum-stability (dev).
# Jan 24th, 19:21 challgren maybe try `composer require usemuffin/sti:2.0.0-beta`
# Jan 24th, 19:21 luizcmarin I run cake 4.0.2
# Jan 24th, 19:20 challgren oh that should be fine. But if its install 1.0.0 it seems you’re running cake 3.x
# Jan 24th, 19:20 luizcmarin change to beta?
# Jan 24th, 19:20 luizcmarin I have "minimum-stability": "dev".
# Jan 24th, 19:19 challgren yes in the root
# Jan 24th, 19:19 luizcmarin Hello @challgren. I thought I was off ... should I add that to composer.json?
# Jan 24th, 19:17 challgren @luizcmarin you probably need `"minimum-stability": "beta"` in your composer.json https://getcomposer.org/doc/04-schema.md#minimum-stability
# Jan 24th, 19:09 luizcmarin OK. Does anybody know how to solve this? https://cakesf.slack.com/archives/C053DPNGT/p1579880879178400
# Jan 24th, 16:50 kiwi_10 a user can update the doc for me please ? I don't have a Github account
# Jan 24th, 16:50 kiwi_10 The new function to use for mimetypes definitions is setTypeMap : https://api.cakephp.org/3.6/class-Cake.Http.Response.html#_setTypeMap
# Jan 24th, 16:49 kiwi_10 use an array as param don't work
# Jan 24th, 16:49 kiwi_10 and the good answer is the one of the API
# Jan 24th, 16:49 kiwi_10 but, in the API, I need to use a string as param for this same function : https://api.cakephp.org/3.6/class-Cake.Http.Response.html#_withType
# Jan 24th, 16:48 kiwi_10 the doc tell us to use an array for mimetypes definitions
# Jan 24th, 16:48 kiwi_10 there is an error in the CakePHP doc : https://book.cakephp.org/3/fr/controllers/request-response.html#Cake\Http\Response::withType
# Jan 24th, 15:47 luizcmarin @challgren @admad https://github.com/UseMuffin/Sti/issues/8 (starting tests)
# Jan 24th, 14:22 rudy1976s @steinkel thank you Jorge ! I am facing problems using plugin with ADmad i18n , getting redirect loop when using routes with /:lang
# Jan 24th, 12:56 steinkel https://www.cakedc.com/jorge_gonzalez/2020/01/17/users-plugin-9-x-for-cakephp4 this could help
# Jan 24th, 12:55 rudy1976s I am working on implementing CakeDC Users plugin 9.x on a cake 4.0.2 installation. I have also installed admad i18n plugin : I am facing a lot of issues with infinite loops when trying to access login : I have tried to follow docs but it is very difficult because some time docs refers to last version while some other to 3.x: anyone here use UsersPlugin ?
# Jan 24th, 12:51 rudy1976s good afternoon!
# Jan 24th, 12:04 neon1024 Opened an issue :point_right: https://github.com/riesenia/cakephp-duplicatable/issues/44
# Jan 24th, 11:48 neon1024 For conditionally empty associated fields