Log message #4205164

# At Username Text
# 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
# Sep 23rd 2019, 08:33 jotpe Nope. Just have one submitter, and it's saving correctly
# Sep 23rd 2019, 08:32 alexdd55976 just a wild guess
# Sep 23rd 2019, 08:32 alexdd55976 really dunno...
# Sep 23rd 2019, 08:32 alexdd55976 doesn'T it have to be `control('submitter.0.first_name,...`??
# Sep 23rd 2019, 08:29 jotpe I have some nested Forms (Talk->Submitter or Talk->Author). Is there any reason, associated forms don't get the required tag, when I add them like this? `<?= $this->Form->control('submitter.first_name', ['label' => __('Vorname')]) ?>`
# Sep 23rd 2019, 08:07 conehead Well if you actually want to get rid of cookies, yes
# Sep 23rd 2019, 08:05 chupa i think i already saw this one and thought of implementing it, but frontend is easy, i thought there was more to do controller-wise
# Sep 23rd 2019, 08:03 conehead https://cookieconsent.osano.com/documentation/about-cookie-consent/
# Sep 23rd 2019, 08:02 chupa yeah, will do that, but i think it should be enough due to the nature of the project
# Sep 23rd 2019, 08:01 conehead Well I am not a lawyer haha. Your company better double checks it with their lawyer if that is alright for you. As far as I know this is currently enough