# |
Sep 14th 2019, 15:19 |
jotpe |
Is this then correct? `<?= $this->Form->control('emailaddresses[0].email', ['label' => __('E-Mail'), 'required']) ?>` |
# |
Sep 14th 2019, 15:18 |
jotpe |
Btw. I save a User, which hasMany Emailaddresses. In my registration form I want to save just one Emailaddress. |
# |
Sep 14th 2019, 15:17 |
jotpe |
Not sure. It's a nested Model and I had to modify the FormHelper control fieldnames |
# |
Sep 14th 2019, 15:11 |
admad |
best way to handle this would be to sets default in db table itself. Then the forrmhelper inputs will auto fill the fields with those defaults |
# |
Sep 14th 2019, 15:10 |
jotpe |
Thanks :slightly_smiling_face: |
# |
Sep 14th 2019, 15:09 |
jotpe |
Okay |
# |
Sep 14th 2019, 15:09 |
admad |
yes |
# |
Sep 14th 2019, 15:09 |
jotpe |
So beforeMarshal then? |
# |
Sep 14th 2019, 15:09 |
admad |
validation is done on incoming data, not entity properties |
# |
Sep 14th 2019, 15:08 |
slackebot |
<jotpe> |
# |
Sep 14th 2019, 15:08 |
admad |
why would you set invalid defaults? :slightly_smiling_face: |
# |
Sep 14th 2019, 15:08 |
jotpe |
Did this in the constructor: $this->status = self::STATUS_UNCONFIRMED; |
# |
Sep 14th 2019, 15:08 |
jotpe |
@admad thanks, but the it's not validated correct? |
# |
Sep 14th 2019, 14:50 |
admad |
or set in entity's constructor |
# |
Sep 14th 2019, 14:50 |
admad |
set default in database table itself |
# |
Sep 14th 2019, 14:06 |
jotpe |
Hi! Is there a way to set initial values for new entities? I don't want to set the value every time I create a Entity. |
# |
Sep 14th 2019, 13:21 |
peppejaripappalardo |
the problem happen only in the controller with the 2° layout, into the default it redirect as well |
# |
Sep 14th 2019, 13:06 |
peppejaripappalardo |
is not @jim |
# |
Sep 14th 2019, 12:00 |
jimbo2150 |
Make sure the redirect is not cached in your browser. |
# |
Sep 14th 2019, 10:31 |
peppejaripappalardo |
thx anyway challgren |
# |
Sep 14th 2019, 10:30 |
peppejaripappalardo |
this is into the controller for login |
# |
Sep 14th 2019, 10:30 |
challgren |
Im honestly not sure I havent messed with the new authentication much |
# |
Sep 14th 2019, 10:30 |
peppejaripappalardo |
i dont think, because i have added a before filter: public function beforeFilter(Event $event) { $this->Authentication->allowUnauthenticated(['login']);} |
# |
Sep 14th 2019, 10:29 |
challgren |
You might not be allowing your redirected page to be accessed by anyone |
# |
Sep 14th 2019, 10:28 |
peppejaripappalardo |
I got a solutions using unauthenticatedRedirect into the Applications.php, but i get an error ERR_TOO_MANY_REDIRECTS |
# |
Sep 14th 2019, 09:31 |
peppejaripappalardo |
i add that in the backend controller i've added a public method initialize that set the layout |
# |
Sep 14th 2019, 09:29 |
peppejaripappalardo |
hi guys, with the new authentication plugin, how i can set a redirect url ? And how i can tell to the plugin to check the authentication in another layout? because at this time in the default i get plugin auth, but in the backend layout it seems that do not exist |
# |
Sep 14th 2019, 08:28 |
alexdd55976 |
Isn’t it .gitkeep already? |
# |
Sep 13th 2019, 20:42 |
challgren |
Nice! |
# |
Sep 13th 2019, 20:00 |
alexis752 |
That did the trick! Thanks! |
# |
Sep 13th 2019, 19:21 |
jh |
for 4.x can we rename all empty to .keep? |
# |
Sep 13th 2019, 18:39 |
challgren |
`Turning this on shows the SSI Error message.` |
# |
Sep 13th 2019, 18:38 |
challgren |
Maybe turn off ProxyErrorOverride |
# |
Sep 13th 2019, 17:14 |
alexis752 |
This is my apache vhost config |
# |
Sep 13th 2019, 16:54 |
challgren |
Weird |
# |
Sep 13th 2019, 16:54 |
sdevore |
@challgren so as an fyi a quick fix for my __debugInfo() issue was to make ` '[hasErrors]' => $this->hasErrors(false),` in `EntityTrait::__debugInfo()` be non recursive (not a final solution) I’m allocating time this weekend to dig deeper. |
# |
Sep 13th 2019, 16:52 |
alexis752 |
the problem is the render of custom error |
# |
Sep 13th 2019, 16:52 |
alexis752 |
Yes, but my problem isn't about the error itself |
# |
Sep 13th 2019, 16:49 |
slackebot |
"Todo para tu vehículo", icon: "ion-android-pin" }, highlight: false, gridLocation: { x: -2054770, y: 29431 } } lo` |
# |
Sep 13th 2019, 16:49 |
challgren |
`Error: [MongoDB\Driver\Exception\BulkWriteException] Can't extract geo keys: { _id: ObjectId('5cc8937534908a4b46542773'), id: "12632774", title: "ESTACION LOS ANDES", address: "CR 2 38 55", phone: "", location: { coordinates: [ -75881.5637, 876.26365 ], type: "Point" }, createdAt: 1568392500, updatedAt: 1568392500, countryId: 5, status: 1, publish: false, cityId: 4699, products: [ 136, 137 ], club: false, merchantType: { id: 151, name: |
# |
Sep 13th 2019, 16:48 |
challgren |
Looks like your issue is related to geo keys |