Logs for #cakephp

Page 3 of 36,195, showing 100 records out of 3,619,426 total, starting on record 201, ending on 300

# At Username Text
# Yesterday, 08:45 maymeow @graziel i found reason why it isnt working. It looks like you can translate only default cakephp files if you want to translate own classes like me it will return error
# Yesterday, 08:08 graziel @maymeow did quick check on cake 3.8.1 and works ok for me
# Yesterday, 08:01 maymeow @graziel no i have config in app.php i didnt update anything :slightly_smiling_face:... problem is caused with i18n in my opinion
# Yesterday, 07:59 admad sorry gtg
# Yesterday, 07:57 h.mavisakalian @admad Can you give me an example of a raw SQL query that you’re talking about.
# Yesterday, 07:54 maymeow @admad How? `$this->addPlugin('I18n');` i have installed package 3.79
# Yesterday, 07:52 admad if you can't then use the search plugin and figure out the solution by trail and error :slightly_smiling_face:
# Yesterday, 07:51 admad that's still pseudo SQL, not actual SQL :slightly_smiling_face:
# Yesterday, 07:50 h.mavisakalian $array will have values like this … %Value1%, %Value2%, %Value3%
# Yesterday, 07:49 h.mavisakalian “SELECT name FROM Users WHERE name LIKE {$array}”
# Yesterday, 07:47 admad @h.mavisakalian step 1: Figure out the SQL query you need to get the result you want
# Yesterday, 07:47 conehead I think `IN` is at least one. So Even with 2 or more values it should show up
# Yesterday, 07:46 h.mavisakalian also bring the results that have 2 of the array values in the title
# Yesterday, 07:46 h.mavisakalian but
# Yesterday, 07:46 h.mavisakalian $query = $this->Users->find(‘all’,[ ‘conditions’ => [‘name LIKE’ => $searchArray], ‘order’ => [‘Users.id’ => ‘ASC’] ]);
# Yesterday, 07:46 h.mavisakalian something like this
# Yesterday, 07:45 h.mavisakalian that is why I mentioned the LIKE
# Yesterday, 07:45 h.mavisakalian @conehead Thank you, but I need something else… you see the problem is I need the query to give me the results of the rows that for example have 2 values from the array as well
# Yesterday, 07:42 admad yes
# Yesterday, 07:41 koeller @admad So the proper way would be that the client sends another index request?
# Yesterday, 07:41 conehead @h.mavisakalian probably you need something like this: ``` $query = $this->Users->find(‘all’,[ ‘conditions’ => ['yourField IN' => $searchArray], ‘order’ => [‘Users.id’ => ‘ASC’] ]); ```
# Yesterday, 07:40 admad @koeller for a REST API for a delete request you just respond with a success/failure status
# Yesterday, 07:39 admad @maymeow if it's a standalone plugin first plug it into an app :slightly_smiling_face:
# Yesterday, 07:39 koeller @admad: Okay, what would be the best way then? setting a view variable with the result of the finder im using in index Action?
# Yesterday, 07:39 graziel @maymeow you are probably missing cache config after updating cake https://github.com/cakephp/app/blob/master/config/app.default.php#L111
# Yesterday, 07:38 admad @koeller since you mention using JWT auth I assume you are working on a stateless REST API. There's no redirection for such requests.
# Yesterday, 07:37 maymeow Any idea how to solve this?
# Yesterday, 07:36 admad how do you expect `‘conditions’ => $searchArray` to work without specifying which fields/columns to use?
# Yesterday, 07:35 dereuromark see awesome list
# Yesterday, 07:35 slackebot $this->Crud->on('afterDelete') with $this->redirect(['index']) and $this->setAction('index'), but I would only recieve a NotFoundException. I'm a bit puzzled here. Thank you for reading!
# Yesterday, 07:35 h.mavisakalian which plugin is that?
# Yesterday, 07:35 koeller Hi everyone, I have a question regarding the friendsofcake/CRUD plugin. I'm doing a simple delete and try to redirect to index, so that the response of the request would be a list of all items for logged user. I'm using JWT as Authentication method. Reading this:https://crud.readthedocs.io/en/latest/actions/delete.html#crud-beforeredirect I thought, it should automatically redirect to index, but it won't. So I tried to manually redirect in
# Yesterday, 07:35 dereuromark use Search plugin for this
# Yesterday, 07:34 h.mavisakalian What am I doing wrong?
# Yesterday, 07:34 h.mavisakalian But it doesn’t work
# Yesterday, 07:34 h.mavisakalian $query = $this->Users->find(‘all’,[ ‘conditions’ => $searchArray, ‘order’ => [‘Users.id’ => ‘ASC’] ]);
# Yesterday, 07:33 h.mavisakalian Now I want to search the database this way
# Yesterday, 07:33 h.mavisakalian I created an array from a search query with all values using exlode(’ ’, $searchValue);
# Yesterday, 07:31 h.mavisakalian Good morning everyone. I have a question about search queries in CakePHP 3.X
# Yesterday, 07:25 aivaras.godliauskas here you can set conditions
# Yesterday, 07:25 aivaras.godliauskas ``` class ArticlesTable extends Table { public function initialize(array $config) { $this->hasMany('Comments') ->setConditions(['approved' => true]); $this->hasMany('UnapprovedComments', [ 'className' => 'Comments' ]) ->setConditions(['approved' => false]) ->setProperty('unapproved_comments'); } } ```
# Yesterday, 07:25 aivaras.godliauskas https://book.cakephp.org/3.0/en/orm/associations.html#default-association-conditions
# Yesterday, 07:24 neon1024 I need gmp, sodium and intl
# Yesterday, 07:24 neon1024 Anyone know where I can find package names for PHP extension for Debian Fastly?
# Yesterday, 07:23 aivaras.godliauskas Hi @neon1024 Fun fact im useing n3on as my nic
# Yesterday, 07:23 felix.robaglia I'd be curious how ! I'm an intern and have a lot to learn @aivaras.godliauskas ^^ How can I say it directly in the table ?
# Yesterday, 07:23 neon1024 Morning all :wave:
# Yesterday, 07:23 aivaras.godliauskas or you can try and use some kind of soft delete for example https://github.com/UseMuffin/Trash
# Yesterday, 07:23 neon1024 I quite like creating my own query and passing it to the Paginator :slightly_smiling_face:
# Yesterday, 07:22 aivaras.godliauskas if you want to do it right way you can add this condition in table itself, where realiation is defined
# Yesterday, 07:22 admad no. read up about custom finders on manul
# Yesterday, 07:22 felix.robaglia Like a method i'll put in my AppController admad?
# Yesterday, 07:22 felix.robaglia Wow, thanks a lot, I must be blind then cause it has to be in the doc ! Ty guys !
# Yesterday, 07:22 admad also a cleaner way would be to make a custom finder for that
# Yesterday, 07:21 admad or use `conditions` like that :slightly_smiling_face:
# Yesterday, 07:21 aivaras.godliauskas @felix.robaglia you can go ``` $this->paginate = [ 'contain' => ['Contracts'=>[ 'conditions'=>['delete IS'=>null] ] ] ]; ``` i believe
# Yesterday, 07:21 admad @felix.robaglia `['contain' => ['Contracts' => function ($q) { $q->where(...)}]`
# Yesterday, 07:19 felix.robaglia But I would like to only get contracts that have NULL in their 'deleted' column. I'm sorry if that's a dumb question or anything, but I did read the doc and i'm still stuck ! Thanks :slightly_smiling_face:
# Yesterday, 07:19 felix.robaglia ``` $this->paginate = [ 'contain' => ['Contracts'] ]; ```
# Yesterday, 07:19 felix.robaglia Hello, I'm discovering hasMany relations and i'm stuck on something I guess is really easy. I have a clients table, and it hasMany contracts. So I use this piece of code to retrieve contracts in my Clients Controller :
# Yesterday, 07:18 maymeow After i run i18n extract on plugin i have problem with `The "_cake_core_" cache configuration does not exists.` what now?
# Yesterday, 01:38 niel45 I'm gguessing that would depend on what you are using as the Authenticator. If you have used your own User class you would reset the password via that I'm guessing. I have not implemented it yet myself.
# Yesterday, 01:06 geoff anybody here have experience with the new authentication plugin? i'm having a hard time finding any instructions on how to reset a user's password. i'm sure it's simple, and i'm missing something very easy and i'll feel _very_ dumb once somebody explains it to me... any tips?
# Jul 16th, 19:52 maymeow ill try
# Jul 16th, 19:45 challgren @maymeow for testing I would set at least 1 migration to be a break point and see if -t 0 does all of them or to the first break point
# Jul 16th, 19:44 maymeow yes i know but in this db is everything created only via Migrations
# Jul 16th, 19:43 niel45 rollback only works for table you have created via Migrations. Any thing existing before that isn't touched.
# Jul 16th, 19:41 maymeow ill try what said @ricksaccous... i think `bin/cake migrations rollback -t 0` will work for me
# Jul 16th, 19:41 maymeow yes @niel45... something like `php artisan migrate:refresh` in laravel. When i post changes to app they will go to CI and are deployed to review
# Jul 16th, 19:40 niel45 if so, there is a method from Phinx that will check for a table exiting. I've used it for exactly that
# Jul 16th, 19:38 niel45 @maymeow, are you asking how to drop tables if they exist, before creating them in a migration?
# Jul 16th, 19:37 challgren Couldn’t you write a shell to truncate the tables for you? and then run all the migrations?
# Jul 16th, 19:37 maymeow wrong writen ansver but yes i need run all migrations to create clean tables ...
# Jul 16th, 19:34 ricksaccous that would essentially delete all your db tables though
# Jul 16th, 19:34 ricksaccous then you could run them again, but that's only if everyone on your team properly made rollbacks
# Jul 16th, 19:33 ricksaccous like bin/cake migrations rollback -t 0
# Jul 16th, 19:33 ricksaccous i mean supposedly you'd be able to rollback everything
# Jul 16th, 19:33 ricksaccous are you having fk issues when you run migrations?
# Jul 16th, 19:32 ricksaccous @maymeow what do you mean?
# Jul 16th, 19:32 maymeow How can i run clean migrations? (without need to delete database tables manually)
# Jul 16th, 18:07 maxxstyle06 help him guys!
# Jul 16th, 18:07 maxxstyle06 I cannot help xD
# Jul 16th, 17:54 itmpls Why does scope not seem to work at all? Am I doing it wrong? I have a similar row with the same company_id but it doesn't throw any validation error. If I remove the scope array then it properly shows it.
# Jul 16th, 17:38 maxxstyle06 I can pay money aswell if someone wants
# Jul 16th, 17:37 maxxstyle06 Can someone come to teamviewer please?
# Jul 16th, 17:36 maxxstyle06 https://wi.cr/links/go
# Jul 16th, 17:35 maxxstyle06 Api link
# Jul 16th, 17:34 maxxstyle06 Here is api link
# Jul 16th, 17:34 maxxstyle06 wi.cr/links/go
# Jul 16th, 17:34 maxxstyle06 It’s wi.cr
# Jul 16th, 17:33 maxxstyle06 http://wikihosting.us/HKcr
# Jul 16th, 17:32 maxxstyle06 Here is my website
# Jul 16th, 17:31 maxxstyle06 I’m not using oauth2
# Jul 16th, 17:31 maxxstyle06 Devito no bro
# Jul 16th, 17:26 devito are you using any implementation of oauth2? Cause you can leverage the Client grant flow for this.
# Jul 16th, 17:24 devito ahh
# Jul 16th, 17:23 maxxstyle06 Yes
# Jul 16th, 17:23 itmpls so you control both domains?
# Jul 16th, 17:23 maxxstyle06 To my main domain which uses cakephp
# Jul 16th, 17:23 maxxstyle06 That is not using cakephp