# |
Dec 22nd 2017, 00:26 |
braeden |
I can't see any downsides to doing so (at the moment), it centralises the whole process, and it's a query I am using quite frequently |
# |
Dec 22nd 2017, 00:25 |
braeden |
Is it sensible to perform caching read/writes in a Table's custom finder method? e.g. $users->find('nameAndImage') which will either return the result from the cache or query the DB? |
# |
Dec 22nd 2017, 00:08 |
itamer |
I'm looking at authentication in cake3 - at the moment the user is handed off to a cake2 site for authenication and then returned. If I use UseMuffin/OAuth2 all the passwords will be retained, right? |
# |
Dec 21st 2017, 22:13 |
braeden |
debug( $this->request->data ) ? |
# |
Dec 21st 2017, 21:34 |
genellern |
Hi guys, any idea how to test a request from a form to upload a photo? |
# |
Dec 21st 2017, 20:11 |
admad |
justcharlz: https://github.com/UseMuffin/Tokenize/blob/master/src/Model/Behavior/TokenizeBehavior.php#L104 https://github.com/UseMuffin/Tokenize/blob/master/src/Model/Table/TokensTable.php#L76 |
# |
Dec 21st 2017, 19:53 |
HippoCritical |
Hello Everyone. Are SocketExceptions normally caused by sending emails using Cake? I have an application that's supposed to be sending emails once a user fills out a form, but it keeps giving errors. I looked in the apache error.log file and found a few errors relating to SocketException |
# |
Dec 21st 2017, 16:56 |
ceeram |
there she is |
# |
Dec 21st 2017, 16:53 |
ceeram |
. |
# |
Dec 21st 2017, 16:47 |
ceeram |
or, almost |
# |
Dec 21st 2017, 16:47 |
ceeram |
@neon1024 my colleague got you as mentor :slightly_smiling_face: |
# |
Dec 21st 2017, 16:21 |
justcharlz |
It's alway empty. Also want to know if it is possible to have other data filled saved somewhere instead of making the user enter the details all over again |
# |
Dec 21st 2017, 16:20 |
justcharlz |
Hello house, I think I have seen @admad here before. Developer of the UseMuffin/Tokenize plugin https://github.com/UseMuffin/Tokenize Need to know what is meant to be in the foreign_data[] of the tokenize table. |
# |
Dec 21st 2017, 16:06 |
slackebot3 |
$this->Crud->listener(‘view’)->beforeRender($event); parent::beforeRender($event); // TODO: Change the autogenerated stub } |
# |
Dec 21st 2017, 16:06 |
torvault |
I answered my own question: public function beforeRender(Event $event) { //Tell the view Builder that you want to render using the CrudView View class //This ensures that the correct layouts are applied to the view $this->viewBuilder()->setClassName(‘CrudView.Crud’); //This ensures that all of the menu and navigations variables are passed to the view |
# |
Dec 21st 2017, 15:44 |
cgtag |
How do you guys get the country flag added to your names? |
# |
Dec 21st 2017, 15:39 |
neon1024 |
Yep |
# |
Dec 21st 2017, 15:39 |
ceeram |
hi @neon1024 you doing php mentorship :slightly_smiling_face: |
# |
Dec 21st 2017, 15:14 |
neon1024 |
Yups |
# |
Dec 21st 2017, 15:14 |
neon1024 |
https://github.com/cakephp/cakephp/blob/master/src/Http/ServerRequest.php#L1467 |
# |
Dec 21st 2017, 15:13 |
neon1024 |
I’ll stop being lazy and go check |
# |
Dec 21st 2017, 15:12 |
neon1024 |
Well you can see that it isn’t from my given code I would hope. |
# |
Dec 21st 2017, 15:08 |
torvault |
->getData(‘foo’); if it’s the primary model/table. |
# |
Dec 21st 2017, 15:07 |
Meowritzo |
228 |
# |
Dec 21st 2017, 15:06 |
neon1024 |
Just a quick sanity check. `$this->Form->control('Examples.foo');` `$this->request->getData('Examples.foo')` right? |
# |
Dec 21st 2017, 15:04 |
torvault |
Question about CrudView. Is it possible to force it to render a custom non-crud action in the layout with all the other crud views? |
# |
Dec 21st 2017, 14:54 |
neon1024 |
I suppose it means the association class doesn’t have the method |
# |
Dec 21st 2017, 14:54 |
neon1024 |
I don’t understand that one ` 132 Call to an undefined method App\Model\Table\AcquiresTable|Cake\ORM\Association\HasMany::newEntity().` |
# |
Dec 21st 2017, 14:52 |
neon1024 |
Liberal use of ?string etc I bet ;) |
# |
Dec 21st 2017, 14:51 |
neon1024 |
It’ll be pretty interesting to see how all this shakes down in the 4.x release with all the return type and param scalar hints |
# |
Dec 21st 2017, 14:51 |
neon1024 |
Similar stuff like `$this->Flash->success(__('Hello'));` gives an error because the localisation function can return `string|null` but the success method doesn’t take null |
# |
Dec 21st 2017, 14:49 |
neon1024 |
Its’ quite interesting how much stuff php stan finds |
# |
Dec 21st 2017, 14:47 |
neon1024 |
Hm, might have to just ignore those then |
# |
Dec 21st 2017, 14:47 |
neon1024 |
Oh yes, I suppose it can |
# |
Dec 21st 2017, 14:47 |
neon1024 |
`44 Cannot call method where() on array|Cake\ORM\Query.` |
# |
Dec 21st 2017, 14:46 |
dereuromark |
find() can return array with hydrate false |
# |
Dec 21st 2017, 14:44 |
neon1024 |
Unless perhaps the core framework return types don’t match |
# |
Dec 21st 2017, 14:44 |
neon1024 |
I’m curious why it thinks it can be an array when it’s a $query = $this->Examples->find() |
# |
Dec 21st 2017, 14:43 |
neon1024 |
` 59 Parameter #1 $object of method Cake\Controller\Controller::paginate() expects Cake\ORM\Query|Cake\ORM\Table|string|null, array|Cake\ORM\Query given.` |
# |
Dec 21st 2017, 14:43 |
neon1024 |
This is an odd one from phpstan |
# |
Dec 21st 2017, 14:40 |
neon1024 |
So I need to loop my query and assign each one?! |