Log message #4208558

# At Username Text
# Oct 13th 2019, 15:36 this.impetus But that path is accurate. Can anyone tell me what's wrong, here?
# Oct 13th 2019, 15:35 this.impetus produces: 111(int) 0 => '/Template/Pages/home.mobile.ctp', (int) 1 => false ]111
# Oct 13th 2019, 15:34 this.impetus This code ```$view_base = DS."Template" .DS. $this->name . DS; $page = $this->request->getParam('pass')[0]; $view_file = new File ($view_base. $page . '.mobile.ctp'); debug([$view_base. $page . '.mobile.ctp', $view_file->exists()]);```
# Oct 13th 2019, 15:34 this.impetus Hey guys—I'm writing an `afterFilter()` for AppController that' just intended to check if a mobile version of Page exists.
# Oct 13th 2019, 13:44 eber.freitas @luizcmarin Why do you think they don't look the same?
# Oct 13th 2019, 13:29 luizcmarin * Just transcribe to cake3 format.
# Oct 13th 2019, 13:23 luizcmarin It is impossible for me to convert the code below. I want the second checkbox to look like the first (red). Please could someone show me how to solve? <div class="checkbox checkbox-danger mb-2"> <input id="bloqueado" type="checkbox" checked=""> <label for="bloqueado"> Danger </label> </div> <?= $this->Form->checkbox('bloqueado', [ 'label' => __('Bloqueado') ]); ?>
# Oct 13th 2019, 04:58 admad @neon1024 here's your cakephp micro framework :P https://github.com/cakephp/http#using-the-http-server
# Oct 13th 2019, 04:49 admad just override the method which set's `maxLength`
# Oct 12th 2019, 22:54 kevin.pfeifer and i dont want to set the maxLenght value again on every ->control function in my templates directory
# Oct 12th 2019, 22:53 kevin.pfeifer hey guys, another quick question. Is there a way to add a default data-attribute to all inputs? I already have extended the FormHelper with my custom FormHelper but I want to use the already existing "maxLength" value inside a data-attribute since its how my frontend framework works. Is there an easy way to do this?
# Oct 12th 2019, 16:43 ssalvatori any ideas why _joinData doesn´t work ? even if retailer->brands[key] is an entity
# Oct 12th 2019, 16:42 ssalvatori $this->Retailers->save($retailer)
# Oct 12th 2019, 16:42 ssalvatori then I´m doing the save
# Oct 12th 2019, 16:41 ssalvatori but I'm getting Creating default object from empty value for the two lines in the foreach
# Oct 12th 2019, 16:41 slackebot1 = true; }
# Oct 12th 2019, 16:41 ssalvatori $retailer = $this->Retailers->patchEntity($retailer, $this->getRequest()->getData(), [ 'associated' => [ 'Brands' => ['onlyIds' => true] ] ]); foreach($retailer->brands as $key => $brand) { $retailer->brands[$key]->_joinData->author_id = $this->Auth->user('id'); $retailer->brands[$key]->_joinData->active
# Oct 12th 2019, 16:41 ssalvatori I have the following
# Oct 12th 2019, 16:34 ssalvatori )
# Oct 12th 2019, 16:34 ssalvatori (i´m trying to save BTM with through
# Oct 12th 2019, 16:33 ssalvatori Hi, I have a question with _joinData
# Oct 12th 2019, 15:38 ttn Isn't it $this->Crud->on('beforeSave', function(\Cake\Event\Event $event) { //modification of entity }? But if its the latter case i don't have access to variables outside the inner function definiton, right?
# Oct 12th 2019, 14:41 ttn In my controller in the add() action i write $this->Crud->on('beforeSave', function(\Cake\Event\Event $event) {} but i don't know how to modify the entity that is part of that event. Because in the function context i just can access the $event but not my $entity from the add() action.
# Oct 12th 2019, 14:35 ttn no. How do i manage this?
# Oct 12th 2019, 13:31 slackebot1 if i write $this->myEntity->save($myEntity) it saves the data to the database BUT crud seems to persist it again automatically, but this time it uses the entity that was not modified like myEntity. This leads to an error message shown in flash that the entity could not be saved. How to work around this? Using a custom saveMethod? How to implement a custom save method?
# Oct 12th 2019, 13:31 ttn Hi there. I need help using Crud and CrudView. I have written a custom add() action for a controller. I create an entity with $myEntity = $this->entity->newEntity(). I read the data i get from the form via POST with $this->request->is('post'). I patch an entity using $myEntity = patchEntity($myEntity, $this->request->getData()). Then i modify some attriubtes of the myEntity object. Finally, i want to save this entity. But now with crud enabled
# Oct 12th 2019, 13:05 damiano there is a plugin but it seems not very followed
# Oct 12th 2019, 13:05 damiano @kazunanakama hey i wrote the same thing, i need mongodb
# Oct 12th 2019, 11:44 kazunanakama Anybody know if there will be a MongoDB Datasource made for 4?
# Oct 12th 2019, 11:43 slackebot1 <kazunanakama>
# Oct 12th 2019, 10:20 slackebot1 !help
# Oct 12th 2019, 10:20 slackebot1 Command sent from Slack by challgren:
# Oct 12th 2019, 09:23 kazunanakama Problem 1 - Installation request for cakephp/cakephp 4.0.0-beta4 -> satisfiable by cakephp/cakephp[4.0.0-beta4]. - cakephp/cakephp 4.0.0-beta4 requires cakephp/chronos 2.x-dev as 2.0.0 -> satisfiable by cakephp/chronos[2.x-dev] but these conflict with your requirements or minimum-stability.
# Oct 12th 2019, 09:23 kazunanakama I tried creating a new project and then upgrading
# Oct 12th 2019, 09:06 kazunanakama Anybody get CakePHP 4.0 to run yet?
# Oct 12th 2019, 09:03 damiano heavy and slow
# Oct 12th 2019, 09:03 damiano so when i do field = 'domething' it is basically a complete scan over the table
# Oct 12th 2019, 09:02 damiano @challgren yeah i thought the same, mariadb also has dinamic column (less or more the same) the problem is that i cannot index them
# Oct 12th 2019, 09:02 challgren Json fields?
# Oct 12th 2019, 09:02 damiano it si very hard to mantain
# Oct 12th 2019, 09:02 damiano i mean for each user defined field i should create a join,