# |
Jun 17th 2019, 22:06 |
ricksaccous |
so |
# |
Jun 17th 2019, 22:05 |
ricksaccous |
interestinggggg |
# |
Jun 17th 2019, 22:05 |
ricksaccous |
this is the error i'm getting Error: Identity found in request does not implement Authentication\IdentityInterface |
# |
Jun 17th 2019, 22:05 |
ricksaccous |
oh heh |
# |
Jun 17th 2019, 21:58 |
ricksaccous |
the identity object does not look correct |
# |
Jun 17th 2019, 21:57 |
slackebot1 |
<ricksaccous> |
# |
Jun 17th 2019, 21:57 |
rightscoreanalysis |
that makes no sense |
# |
Jun 17th 2019, 21:57 |
rightscoreanalysis |
if I debug $query->count() the result is 0 |
# |
Jun 17th 2019, 21:57 |
rightscoreanalysis |
I have a query - if I debug the sql and pasteinto mysql I get two results |
# |
Jun 17th 2019, 21:56 |
rightscoreanalysis |
I have some unexaplained behaviour: |
# |
Jun 17th 2019, 21:55 |
ricksaccous |
and my entity has it but the user obect here: $authorization = new AuthorizationMiddleware( $this, [ 'identityDecorator' => function ($auth, $user) { debug($user); return $user['data']->setAuthorization($auth); } ] ); |
# |
Jun 17th 2019, 21:55 |
ricksaccous |
it's telling me the setAuthorization method doesn't exist |
# |
Jun 17th 2019, 21:55 |
ricksaccous |
I'm getting stuck around here: https://book.cakephp.org/authorization/1.1/en/middleware.html#identity-decorator |
# |
Jun 17th 2019, 20:51 |
ricksaccous |
woo woo |
# |
Jun 17th 2019, 20:51 |
ricksaccous |
i'm about to delve into authorization |
# |
Jun 17th 2019, 18:05 |
daniel.upshaw |
Anyone have information on why the "`autoload`" option was removed from `$app->addPlugin()`? https://stackoverflow.com/a/56386760 |
# |
Jun 17th 2019, 17:29 |
neothermic |
@dereuromark might implement that shim for testing |
# |
Jun 17th 2019, 16:15 |
phpraven |
maybe you're right, I will think about it |
# |
Jun 17th 2019, 16:12 |
admad |
having the Profiles table in its own plugin is wacky nonetheless :slightly_smiling_face: |
# |
Jun 17th 2019, 16:11 |
phpraven |
I used cake bake all and the className was wrong User.Profiles should be Profile.Profiles just like you said @admad now it works :slightly_smiling_face: thanks guys |
# |
Jun 17th 2019, 16:09 |
ricksaccous |
oh he put the class on it, it's probably already just plopping out as a text field, i wonder if his db typing is correct, but yeah |
# |
Jun 17th 2019, 16:08 |
ricksaccous |
maybe he over-rode the date type with his own widget XD |
# |
Jun 17th 2019, 16:04 |
admad |
since you don't have have it seems formhelper isnt aware of your profile table schema and thus your table class isnt being used |
# |
Jun 17th 2019, 16:03 |
admad |
since you are using a JS datetime picker you would generally need `'type' => 'text'` in options to get Form->control() to generate a text field, cause by default cake would give you 3 dropdowns for datefields |
# |
Jun 17th 2019, 16:03 |
ricksaccous |
or just validate default |
# |
Jun 17th 2019, 16:03 |
ricksaccous |
not sure if you want a custom validation method |
# |
Jun 17th 2019, 16:03 |
ricksaccous |
in patchEntity and Form Helper |
# |
Jun 17th 2019, 16:03 |
ricksaccous |
@phpraven it's also about settng it up correctly |
# |
Jun 17th 2019, 16:00 |
phpraven |
ok I will check, thanks |
# |
Jun 17th 2019, 15:59 |
admad |
check debukit and ensure you table class are being used and not `Table` for the 2 models |
# |
Jun 17th 2019, 15:58 |
admad |
i see className is set like that |
# |
Jun 17th 2019, 15:58 |
admad |
err sorry |
# |
Jun 17th 2019, 15:58 |
admad |
then you need to use `User.Users` and `Profile.Profiles` when setting up associations |
# |
Jun 17th 2019, 15:57 |
phpraven |
@admad I have two plugins User and Profile |
# |
Jun 17th 2019, 15:57 |
admad |
only if they are in separate plugins should they be under separate namespaces |
# |
Jun 17th 2019, 15:56 |
admad |
both should be under `App\Model\Table` |
# |
Jun 17th 2019, 15:56 |
admad |
@phpraven why are you User and Profile models in their own namepsaces? |
# |
Jun 17th 2019, 15:29 |
phpraven |
Hi, how can I validate associated model in cakephp 3.7 ? I have User with hasOne Profile, in registration form I want to validate profile.birthday But I don`t see any validation errors, I have no idea what I'm doing wrong UsersController (register) https://pastebin.com/6PS9czZk UserTable https://pastebin.com/gahYirDA ProfilesTable https://pastebin.com/guhyvuSR register.ctp https://pastebin.com/FZsiw4jp |
# |
Jun 17th 2019, 14:28 |
scriptstupid |
actually just realized I'm probably dumb and it's supposed to do that |
# |
Jun 17th 2019, 14:28 |
scriptstupid |
Having a problem where Auth->idenfity() is returning an array instead of an entity. Please see https://pastebin.com/6VET1pbr |
# |
Jun 17th 2019, 14:03 |
swimboy |
I’m trying to change the default date display format to show 4 digit years instead of 2 digit. I’ve set my defaultLocale in app.php, and tried putting `\Cake\I18n\Time::setToStringFormat('MM/dd/YYYY HH:mm:ss');` in my AppController.php in the beforeRender function, but it’s not working. I also tried putting it in my bootstrap.php with the other date and time settings, to no avail. |