# |
Jun 7th 2019, 09:14 |
challgren |
Can you paste the line? |
# |
Jun 7th 2019, 09:13 |
liaogz82 |
controller |
# |
Jun 7th 2019, 09:11 |
challgren |
What class are you seeing it in @liaogz82 |
# |
Jun 7th 2019, 08:59 |
liaogz82 |
nvm I work on it |
# |
Jun 7th 2019, 08:59 |
liaogz82 |
strange it wasnt flagged out locally |
# |
Jun 7th 2019, 08:59 |
challgren |
and will be removed in 4.0 |
# |
Jun 7th 2019, 08:59 |
challgren |
@liaogz82 yes because you are using functions that have been deprecated |
# |
Jun 7th 2019, 08:59 |
liaogz82 |
has error() been depreciated? |
# |
Jun 7th 2019, 08:58 |
liaogz82 |
is this normal? |
# |
Jun 7th 2019, 08:58 |
jotpe |
<?php $this->Form->setTemplates(['submitContainer' => '<div class="options main active">{{content}}</div>']); ?> <?= $this->Form->submit('Login'); ?> |
# |
Jun 7th 2019, 08:58 |
liaogz82 |
I get this in cakephp `errors() is deprecated. Use setError()/getError()` |
# |
Jun 7th 2019, 08:58 |
jotpe |
Right now i have |
# |
Jun 7th 2019, 08:58 |
jotpe |
Hey. Can I set the template directly in the creation of a form element? |
# |
Jun 7th 2019, 08:44 |
k4t |
May I ask why CakePHP HTTP client use PHP streams instead of e.g. CURL? |
# |
Jun 7th 2019, 08:43 |
ondrej.nedvidek |
yep, thanks Mark .. that is what I meant .. |
# |
Jun 7th 2019, 08:22 |
dereuromark |
or it is default not null, which would also require some input here. |
# |
Jun 7th 2019, 08:21 |
dereuromark |
i think he means the literal field in the DB, probably he has requirePresence activated too eagerly. |
# |
Jun 7th 2019, 08:19 |
conehead |
I don't really get what you mean. DisplayField is only used for outputting data? |
# |
Jun 7th 2019, 08:15 |
ondrej.nedvidek |
Table displayField. When set the field is required, but for my case I generate it in beforeSave. Any idea how to disable validator for this field? Nedvajz has many questions today, ha ? 8) |
# |
Jun 7th 2019, 07:07 |
conehead |
cakephp will handle it |
# |
Jun 7th 2019, 07:07 |
conehead |
@liaogz82 Just save the date-time object |
# |
Jun 7th 2019, 07:01 |
liaogz82 |
how does one save time for cakephp? |
# |
Jun 7th 2019, 06:53 |
ondrej.nedvidek |
Anyone who is interested: `$this->Crud->action()->saveOptions(['validate' => 'admin']);` |
# |
Jun 7th 2019, 06:24 |
ondrej.nedvidek |
Does anyone know how to set 'validate' to different set of rules in CRUD validate: https://book.cakephp.org/3.0/en/orm/validation.html#using-a-different-validation-set CRUD: https://crud.readthedocs.io/en/latest/ |
# |
Jun 7th 2019, 05:38 |
conehead |
Hm I don't really get it. I am trying to keep the `_joinData`. It says `[dirty] => [_joinData => true]`, but there were no changes and the `[original] => ['_joinData']` and the `['_joinData'] is equals. Because of this, the joinData is created a second time |
# |
Jun 7th 2019, 04:51 |
conehead |
Hm anyone got an idea how to keep `through` data? Do I actually NEED the `through` table or is it optional? |
# |
Jun 7th 2019, 04:45 |
conehead |
Guess it should be `Asia/Malaysia` |
# |
Jun 7th 2019, 04:44 |
liaogz82 |
or should it be `Asia/Malaysia`? |
# |
Jun 7th 2019, 04:43 |
liaogz82 |
can I set it as `GMT+8`?? |
# |
Jun 7th 2019, 04:38 |
niel45 |
defaults to UTC IIRC |
# |
Jun 7th 2019, 04:38 |
niel45 |
default timezone can be set in your app.php |
# |
Jun 7th 2019, 04:36 |
liaogz82 |
ok how do you set the timezone in cakephp? |
# |
Jun 7th 2019, 04:30 |
conehead |
And just make sure you get no errors with the timezone |
# |
Jun 7th 2019, 04:29 |
conehead |
And save it as DateTime |
# |
Jun 7th 2019, 04:29 |
conehead |
I am not an expert, but right now, in ```beforeMarshal()``` I would check if it is a valid timestamp and convert it to DateTime |
# |
Jun 7th 2019, 04:28 |
liaogz82 |
`"date_of_birth":1555862400000` |
# |
Jun 7th 2019, 04:28 |
liaogz82 |
well customer requirement is the data send over is in miliseconds |
# |
Jun 7th 2019, 04:27 |
conehead |
Or an int? |
# |
Jun 7th 2019, 04:27 |
conehead |
Why would you? As a string? |
# |
Jun 7th 2019, 04:27 |
liaogz82 |
check with you guys, how do you save date time in milliseconds in cakephp? |
# |
Jun 7th 2019, 04:21 |
liaogz82 |
oh god no! I go and add it in now |