# |
Sep 23rd 2019, 11:04 |
javier.villanueva |
ok thanks |
# |
Sep 23rd 2019, 11:04 |
neon1024 |
You could always make a custom data type for just time |
# |
Sep 23rd 2019, 11:04 |
alexdd55976 |
@javier.villanueva varchar or datetime... time is a waste of time |
# |
Sep 23rd 2019, 11:04 |
javier.villanueva |
I think that is better for me to use an varchar field for save it |
# |
Sep 23rd 2019, 11:03 |
neon1024 |
Blame PHP :) https://www.php.net/datetime |
# |
Sep 23rd 2019, 11:02 |
javier.villanueva |
:( |
# |
Sep 23rd 2019, 11:01 |
neon1024 |
As there isn’t a Time class |
# |
Sep 23rd 2019, 11:01 |
neon1024 |
I believe so |
# |
Sep 23rd 2019, 11:00 |
javier.villanueva |
when I have a TIME field (mysql) ... and I get this value in cakephp... Its normal that returns an FrozenTime and set today in Date by default? |
# |
Sep 23rd 2019, 10:55 |
neon1024 |
Ahh `\Cake\Http\ForbiddenException` :) |
# |
Sep 23rd 2019, 10:54 |
neon1024 |
@jotpe The entity you’re setting to your form might be missing some fields :slightly_smiling_face: |
# |
Sep 23rd 2019, 10:54 |
neon1024 |
What’s the 401 exception? When a user fails Authorization |
# |
Sep 23rd 2019, 10:34 |
jotpe |
`[protected] _validator => [ '' => object(Cake\Validation\Validator) {` contains only the validation rules of Talks, not Submitters |
# |
Sep 23rd 2019, 10:33 |
jotpe |
This is weird. I debugged the context, `[protected] _tables => [` contains the TalksTable and SubmittersTable |
# |
Sep 23rd 2019, 10:21 |
neon1024 |
Which is why I asked about the validation :slightly_smiling_face: |
# |
Sep 23rd 2019, 10:20 |
neon1024 |
https://github.com/cakephp/cakephp/blob/master/src/View/Form/EntityContext.php#L485 |
# |
Sep 23rd 2019, 10:20 |
neon1024 |
Which leads back to here |
# |
Sep 23rd 2019, 10:20 |
neon1024 |
https://github.com/cakephp/cakephp/blob/master/src/View/Form/EntityContext.php#L475 |
# |
Sep 23rd 2019, 10:20 |
jotpe |
Oh no - magic hits again - `protected function _magicOptions` |
# |
Sep 23rd 2019, 10:19 |
neon1024 |
If you’re using EntityContext |
# |
Sep 23rd 2019, 10:19 |
neon1024 |
Which in most cases will be an entity |
# |
Sep 23rd 2019, 10:19 |
neon1024 |
https://github.com/cakephp/cakephp/blob/master/src/View/Helper/FormHelper.php#L1459 |
# |
Sep 23rd 2019, 10:19 |
neon1024 |
Seems you need to debug the form context |
# |
Sep 23rd 2019, 10:13 |
jotpe |
IS there a way I can debug, if the entity is required in the view? |
# |
Sep 23rd 2019, 10:10 |
neon1024 |
:thinking_face: |
# |
Sep 23rd 2019, 10:09 |
jotpe |
Both Entities doesn't have required fields |
# |
Sep 23rd 2019, 10:09 |
jotpe |
For Submitter: yes, For Author: no |
# |
Sep 23rd 2019, 10:08 |
neon1024 |
@jotpe Does the entity you set to the form contain the field? |
# |
Sep 23rd 2019, 10:07 |
jotpe |
@neon1024 yes, it's required. If I add the form in the add.ctp of Submitter it's shown. |
# |
Sep 23rd 2019, 09:45 |
fhxfhx |
k gotit, just adjusted the url to 2.5.1 |
# |
Sep 23rd 2019, 09:26 |
neon1024 |
@jotpe Is the field required in your validation? |
# |
Sep 23rd 2019, 09:16 |
fhxfhx |
didn't find how to download cake 2.5.1 from git ... where do i find it ? |
# |
Sep 23rd 2019, 08:47 |
alexdd55976 |
i understand :) |
# |
Sep 23rd 2019, 08:43 |
jotpe |
yeah...well could do it, but ~30inputs :grimacing: |
# |
Sep 23rd 2019, 08:38 |
alexdd55976 |
add the required manually would be just a workaround |
# |
Sep 23rd 2019, 08:38 |
alexdd55976 |
hm |
# |
Sep 23rd 2019, 08:37 |
jotpe |
Values are set correctly in the form fields |
# |
Sep 23rd 2019, 08:37 |
jotpe |
How do i check? In my Controller i did `$talk->submitter = $this->Talks->Submitters->newEntity()` and set `$this->set(compact('talk','categories'));` |
# |
Sep 23rd 2019, 08:35 |
alexdd55976 |
does the view know about the association to the submitter model? |
# |
Sep 23rd 2019, 08:34 |
alexdd55976 |
oh.. i read your question wrong |
# |
Sep 23rd 2019, 08:33 |
jotpe |
My author model looks like this 'author.0.first_name', still the same with the required fields over there |