Log message #4030377

# At Username Text
# May 19th, 16:50 cake-novice hi. https://pastebin.com/e6i6E4ty here is my code .. i am trying to get result from 3 tables which have foreign_key of each other.. so i am not getting last 3rd tabel data, Which is Template table
# May 19th, 16:46 rudy1976s Hello I am trying to prepare a DB for a new installation of my app: I have created migration to create database tabel: does migrate allow to populate tables with data ?
# May 19th, 16:38 joshuaso91 instead of echo $this->Form->control('roles', array ('disabled' => 'disabled'));
# May 19th, 16:38 joshuaso91 nvm I figured it out. LOLx. Soz for the trouble. I used `echo $this->Form->control('roles', array ('readonly' => 'readonly'));`
# May 19th, 16:33 joshuaso91 any idea how i can turn things around
# May 19th, 16:32 joshuaso91 what i wanted to do is registering a new user before logging in. If it's not a Super admin or admin, then the roles field will be disabled or not be able to see so the default `Staff` value will be inserted into the database
# May 19th, 16:31 joshuaso91 it won't let me submit the form because that error message is telling me the field is not allowed to be empty when it is not
# May 19th, 16:29 joshuaso91 hey guys. I need some advice/help
# May 19th, 16:17 swiffer got it! -> forgot to flush the cache on deployment
# May 19th, 16:07 swiffer https://github.com/cakephp/cakephp/issues/10675
# May 19th, 16:07 swiffer already opened an issue at github but don't know if it's the right place
# May 19th, 16:06 swiffer same code is indeed working on another server
# May 19th, 16:06 swiffer hey, currently cannot find a solution for a problem with ->save() method calling on a table with modified entity object; while getDirty() is showing two modified properties neither of them is saved (query log shows just the modified_at) beeing updated
# May 19th, 15:33 benjmart I'm having trouble with a custom widget and templates. I am trying to figure out how to set attributes on the label (specifically, an id) within the form group template. I can't figure out where I need to add code to modify how the label is written. (I can't seem to do it from the widget, because the formGroup is rendered outside the widgetAnyone have any advice?
# May 19th, 15:26 slackebot idea as to how I can update my validator to check if there is an uppercase letter and a digit?
# May 19th, 15:26 slackebot 'hasUppercase'=>[ 'rule'=>['custom', 'regex'=>'/[A-Z]/'], 'message'=>'Password must contain at least one uppercase letter' ], 'hasDigit'=>[ 'rule'=>['custom', 'regex'=>'/[0-9]/'], 'message'=>'Password must contain at least one number' ] ]); ``` The custom rules in hasUppercase and hasDigit are causing this error it seems, but since I am still kind of a cake noob and didn't write the code, I don't know how to fix it. Does any
# May 19th, 15:26 animepauly We updated cakephp from 3.3.x to 3.4.5, and now when users attempt to register, they get the following error: ``` [Error] Cannot unpack array with string keys in /var/www/public/adphenom-portal/vendor/cakephp/cakephp/src/Validation/ValidationRule.php ``` I have pinpointed the problem to here: ``` $validator->add('new_password', [ 'length'=>[ 'rule'=>['minLength', 6], 'message'=>'Password must contain at least 6 characters' ],
# May 19th, 14:31 cake-novice hi. https://pastebin.com/e6i6E4ty here is my code .. i am trying to get result from 3 tables which have foreign_key of each other.. so i am not getting last 3rd tabel data, Which is Template table
# May 19th, 14:29 obinoob cake-novice: thank you ;)
# May 19th, 14:28 cake-novice http://josediazgonzalez.com/2015/12/23/data-validation-in-cakephp-3/ see this
# May 19th, 14:27 cake-novice obinoob: yes you can create
# May 19th, 14:25 obinoob is it possible to create a custom validator and call in a controller action method?
# May 19th, 14:15 obinoob Can I create a custom validator only for sending emails?
# May 19th, 14:14 cake-novice $this->User->recursive = 0; $this->User->bindModel(['belongsTo' => ['Form' =>['className' => 'Form', 'foreignKey' => 'form_id']]]); $leads = $this->User->find('all', 'contain' => array('Form'));
# May 19th, 14:14 cake-novice form has template_id (template primary key)
# May 19th, 14:14 cake-novice User has form_id (form primary key)
# May 19th, 14:14 cake-novice User , Form, Template
# May 19th, 14:14 cake-novice what i am doing wrong in this i am not getting data of template modal
# May 19th, 14:13 cake-novice User , Form, Template User has form_id (form primary key) form has template_id (template primary key) $this->User->recursive = 0; $this->User->bindModel(['belongsTo' => ['Form' =>['className' => 'Form', 'foreignKey' => 'form_id']]]); $leads = $this->User->find('all', 'contain' => array('Form'));
# May 19th, 13:56 GuillaumeP For those interested, I found the answer here on S.O. : http://stackoverflow.com/questions/36722156/cakephp-3-how-to-validate-multiple-select-field-belongstomany-association
# May 19th, 13:44 GuillaumeP Neon1024: there is a validation method named "multiple" which works fine, but I'm probably not naming the field right when in HABTM
# May 19th, 13:32 Neon1024 requirePresence()*
# May 19th, 13:32 Neon1024 I’d probably just use requiredPresence() and notEmpty()
# May 19th, 13:31 GuillaumeP Hi! Have you ever tried to create a validation method in Cake 3 to make sure that at least one choice is made in a MultipleSelect or CheckboxGroup (HABTM) ? I can only make it work in a non-HABTM context.
# May 19th, 13:28 rudy1976s thank you @neon1024
# May 19th, 13:28 Neon1024 $table->hasField()
# May 19th, 13:28 Neon1024 Ah it’s a shortcut in \Cake\ORM\Table hasField()
# May 19th, 13:27 Neon1024 $this->_table->getSchema()->hasColumn() I think, let me check
# May 19th, 13:27 Neon1024 Yes, I think it has that, but you need to get the schema iirc
# May 19th, 13:19 rudy1976s I was thinking of something lile $this->table->column(‘name’)
# May 19th, 13:19 eax Ahh, not sure then, sorry! :) Good luck!