Logs for #cakephp

Page 4 of 36,130, showing 100 records out of 3,612,917 total, starting on record 301, ending on 400

# At Username Text
# May 20th, 19:46 slackebot SQL error is displayed: Unknown column 'Profiles.tour_guide_id' in 'on clause' This is because CakePHP tries to join a tour guide's profile using the column profiles.tour_guide_id instead of profiles.user_id This combination worked fine in CakePHP 1.3 but I'm having trouble with CakePHP 3 (tried with 3.7.7). Is what I want to do even possible? What am I missing? Thanks for your help and advice in advance.
# May 20th, 18:45 beakman Here's an example on an encrypted database type: https://github.com/bcrowe/cakephp-encrypted-type/blob/master/src/Database/Type/EncryptedType.php Not sure if it'll help, maybe.
# May 20th, 18:33 vinicius.big hello all! I need to create a JS file along with my index.ctp using bake command. Does anyone have an example of that?
# May 20th, 18:30 admad @manthan.budheliya show your type class
# May 20th, 17:58 manthan.budheliya cakephp version is 3.7
# May 20th, 17:58 manthan.budheliya is there anybody who have some idea?
# May 20th, 17:57 manthan.budheliya Hello friends, I have created a custom data type as I wanted to add 2 way encryption to some of my fields. The problem is toPHP function is working but toDatabase function is not calling from any of the possible way.
# May 20th, 17:21 admad need to update to latest release of Search plugin for that
# May 20th, 17:20 admad you can use callback for newly added "beforeProcess" option to unobfuscate the id in filter argument yourself
# May 20th, 16:31 welo.lamacchia I have FooTable hasMany BarTable, I add ->value('foo_id') to SearchManager behavior and load list of BarTable records with HASHED ID
# May 20th, 16:29 welo.lamacchia is there a way to use Muffin/Obfuscate plugin with Friends Of Cake Search Plugin ? I cant perform query when i search for foreign_key hashed id
# May 20th, 15:36 inoas there is some array_values somewhere grml
# May 20th, 15:36 inoas ah stupid indexes
# May 20th, 15:15 inoas well min_runtime_length_in_month
# May 20th, 15:15 inoas for <?= $this->Form->control(sprintf('codes.%s._joinData.max_runtime_length_in_month', $i)
# May 20th, 15:15 inoas errors ['codes' => [0 => ['_joinData' => ['min_runtime_length_in_month' => ['greaterThanOrEqual' => ...
# May 20th, 15:14 inoas '_joinData' => ['min_runtime_length_in_month' => ['greaterThanOrEqual' => ...
# May 20th, 15:14 inoas admad now things do work however validation errors do not map into formhelper
# May 20th, 15:04 dwms understood?
# May 20th, 15:04 dwms is sum of the sum
# May 20th, 15:03 dwms but when I do sum this subquery is returning me null
# May 20th, 15:02 dwms returning null
# May 20th, 15:02 dwms $query->select([ 'valor_baixa_normal' => $query->func()->sum('(' . $baixa_select1 . ')') ]);
# May 20th, 15:01 neon1024 Well as it’s a calculated field it will not be marshalled into a float because the schema doesn’t define the data type
# May 20th, 15:01 dwms because I actually do this
# May 20th, 15:01 dwms should return in float
# May 20th, 15:01 dwms eu preciso que o resultado venha em float
# May 20th, 14:57 neon1024 `(float) $baixa_select1`
# May 20th, 14:57 neon1024 Sure
# May 20th, 14:56 dwms help me
# May 20th, 14:56 dwms neon1024
# May 20th, 14:48 dwms should return in float
# May 20th, 14:48 dwms only the result is returned in string
# May 20th, 14:47 dwms $query->select([ 'valor_baixa_normal' => $baixa_select1 ]);
# May 20th, 14:47 dwms $baixa_select1 = $this->Caixa->find() ->select([ 'valor_baixa' => $this->Caixa->find()->func()->sum('Caixa.valor_baixa'), ]) ->where(function (QueryExpression $exp, Query $q) { return $exp->equalFields('Titulo.id', 'Caixa.titulo_id'); }) ->where([ 'Caixa.ativo' =>
# May 20th, 14:46 dwms I use a subquery in my select
# May 20th, 14:45 neon1024 How can we help? You didn’t ask a question.
# May 20th, 14:43 dwms alone?
# May 20th, 14:42 dwms help me
# May 20th, 14:40 neon1024 Well I can see the BakeView::render method is getting the right file
# May 20th, 14:21 neon1024 Would explain why it’s falling back to core templates
# May 20th, 14:20 neon1024 Might be something to investigate I guess
# May 20th, 14:20 neon1024 > Exception: Return value of Cake\View\View::getTemplatePath() must be of the type string, null returned in [/Users/davidyell/Sites/CakePHP4/vendor/cakephp/cakephp/src/View/View.php, line 414]
# May 20th, 14:10 neon1024 Just trying to find out where it builds the theme at the moment
# May 20th, 14:10 neon1024 Doing that currently
# May 20th, 14:03 josbeir have you digged into the bake code to see whats happening and why it is not happening for you
# May 20th, 13:50 neon1024 No doubt, I bet it’s something simple which I’ve been staring at for hours and just didn’t see
# May 20th, 13:46 berarma No prob. Sometimes I get caught in the obvious things.
# May 20th, 13:45 neon1024 I’m going to try and implement some more verbose output from the shell to get an idea of how it works
# May 20th, 13:44 neon1024 Thanks, I appreciate the input, but I’ve so far invested about 3 hours into it, so I’ve covered most of them
# May 20th, 13:44 berarma I'm just recalling usual problems that could be the cause
# May 20th, 13:43 neon1024 :man-shrugging:
# May 20th, 13:43 berarma of the file
# May 20th, 13:43 neon1024 `view.twig` ?
# May 20th, 13:43 neon1024 Name of what?
# May 20th, 13:43 berarma Some weird character in the name?
# May 20th, 13:43 neon1024 …and it’ll write add, edit and index, with the correct templates
# May 20th, 13:42 neon1024 Plus, you can use `bin/cake bake templates --prefix Admin Questions`
# May 20th, 13:42 neon1024 Not case, as the file is written correctly
# May 20th, 13:42 neon1024 So, not file permission as the file is written
# May 20th, 13:41 berarma @neon1024 file permissions or case?
# May 20th, 13:21 neon1024 That makes me feel a bit better about not being able to find out then :slightly_smiling_face:
# May 20th, 13:16 admad @neon1024 i can't think of a reason either why it would have problem only with "view"
# May 20th, 13:02 neon1024 I just haven’t looked into the bake plugin in great detail so am unsure where to look or even start debugging
# May 20th, 13:02 neon1024 @admad Ahok good point. I’ve added that to the ticket. I wondered if it was the ‘view’ word overlapping with a variable or something
# May 20th, 12:58 dereuromark on save?
# May 20th, 12:55 inoas to not be required to filter all request data
# May 20th, 12:55 inoas Is there a way to treat '' as NULL per column
# May 20th, 12:46 inoas and then some request data wiping
# May 20th, 12:46 inoas hm the hack I am looking for is something like <?= $this->Form->control(sprintf('codes.%s._createJoin', $i), as a checkbox
# May 20th, 12:37 inoas good pointer - thanks
# May 20th, 12:35 admad There are test cases for saving extra field in join table using _joinData
# May 20th, 12:29 inoas but then it must not be id but foreign_key_id? or is it the primary key of the other side table (aka codes id => id)?
# May 20th, 12:28 inoas I will try again
# May 20th, 12:28 inoas yeah I have tried but it will try to validate/save the record then
# May 20th, 12:26 admad you can't combine ._ids with ._joinData records. You need to create array like `[0 => [id => x, _joinData => [weight => 100], 1 => [id => y, _joinData => [..]]]`
# May 20th, 12:23 inoas I don'T want to create habtm records, just link them and add join data while doing so
# May 20th, 12:22 inoas codes._ids + codes.0._joinData.weight = 100
# May 20th, 12:22 inoas what's the correct way to add has and belongs to many checkboxes alongside join table data
# May 20th, 12:19 k4t Router::parse
# May 20th, 12:19 k4t ok, found it
# May 20th, 12:16 k4t is it possible to "deconstruct" url string to array which contain controller name, action, params etc. ?
# May 20th, 12:04 admad @neon1024 "It does add, edit and index just fine" That's a vital piece of info which you havent mentioned in the ticket
# May 20th, 12:02 admad as the names suggests it's called **after** a save is done. So of course any changes done there won't end up in the db.
# May 20th, 11:57 welo.lamacchia why when i change entity in afterSave callback, no edit field was save in my database? In afterSave i have to call save method after changing field ?
# May 20th, 11:44 josbeir i'm probably wrong tho :P
# May 20th, 11:44 josbeir same for the prefix argument
# May 20th, 11:44 josbeir cant recall x=x works in cake but i could be wrong :P
# May 20th, 11:43 josbeir @neon1024 not sure but isn't it --theme xxx instead of theme=xxx
# May 20th, 11:26 neon1024 I can’t figure it out :( Hopefully someone will update the ticket 8)
# May 20th, 10:32 neon1024 I’m reading the TemplateCommand class
# May 20th, 10:31 neon1024 Hey @dereuromark any chance you could point me in the right direction for this? I’m looking for the right bit in the source, but I’m not sure where to look really https://github.com/cakephp/bake/issues/549
# May 20th, 10:20 dereuromark sure, whats the issue using the callback for it?
# May 20th, 10:20 welo.lamacchia everyone know if is possible to change entity field in after save ?
# May 20th, 10:18 ishan Hello, can anyone know how to pass default configurations array in initialize method when using other components in another component.
# May 20th, 10:09 neon1024 Is there a way to validate my twig template?
# May 20th, 09:58 neon1024 Can anyone think why my 4.0.0-alpha1 bake theme won’t use my `view.twig` template? It does add, edit and index just fine
# May 20th, 09:37 kgb.acct.personal Thanks :doge:
# May 20th, 09:34 neon1024 https://book.cakephp.org/2.0/en/core-libraries/behaviors/containable.html
# May 20th, 09:34 neon1024 Oh sorry, you add the behaviour to the model