# |
Feb 9th 2018, 13:48 |
etipaced |
How do you sync them? Just a symlink? |
# |
Feb 9th 2018, 13:34 |
dereuromark |
I keep them in default root, but I sync them into webroot/assets |
# |
Feb 9th 2018, 13:07 |
etipaced |
Where is the best place to put the `node_modules` directory for a Cake 3 app? I’m new to using them and am unsure how to reference them from my templates if they are outside of `/webroot`. |
# |
Feb 9th 2018, 13:00 |
bravo-kernel |
@dereuromark happy cakebox camper? |
# |
Feb 9th 2018, 12:55 |
neon1024 |
Yeah, checking the entity in the controller after the patchEntity it’s still created a new entity. Even with setting $data to null in beforeMarshal. It’s even preserved the data, somehow.. |
# |
Feb 9th 2018, 12:53 |
neon1024 |
Be nice if there was afterMarshal, so I could check what’s happened |
# |
Feb 9th 2018, 12:52 |
neon1024 |
As I have this in my beforeMarshal, and I’d like to not even create an entity for it, and just skip |
# |
Feb 9th 2018, 12:51 |
neon1024 |
File uploaded https://cakesf.slack.com/files/U1BT622HW/F9638JVS5/requestdatadump_txt.txt / https://slack-files.com/T053DPNCM-F9638JVS5-3dfba40abe |
# |
Feb 9th 2018, 12:51 |
neon1024 |
Possibly, sorry I don’t know if there is an issue. Perhaps it’s the one that @seideng linked to yesterday :slightly_smiling_face: |
# |
Feb 9th 2018, 12:50 |
neon1024 |
..and I think beforeSave is too late, as the entity is already created |
# |
Feb 9th 2018, 12:50 |
dereuromark |
does that related to the open core ticket? |
# |
Feb 9th 2018, 12:50 |
neon1024 |
Setting `$data = null;` doesn’t seem to cut it though |
# |
Feb 9th 2018, 12:50 |
neon1024 |
Well this isn’t really just setting to null, as if the fields are empty I don’t want to create or save the entity at all |
# |
Feb 9th 2018, 12:49 |
dereuromark |
for me its a generic issue, not per model |
# |
Feb 9th 2018, 12:49 |
neon1024 |
This use-case is different, as it’s in a plugin |
# |
Feb 9th 2018, 12:49 |
dereuromark |
you dont necessarily need to - use it and be happy :slightly_smiling_face: it fixes the issue that the core has |
# |
Feb 9th 2018, 12:49 |
neon1024 |
I figured at the time, that it would be easier to drop in a quick few lines into my existing beforeMarshal |
# |
Feb 9th 2018, 12:49 |
neon1024 |
I did take a look, but I’ll be honest, I didn’t really understand the code. |
# |
Feb 9th 2018, 12:32 |
dereuromark |
since I use that I dont have data integrity issues anymore |
# |
Feb 9th 2018, 12:31 |
dereuromark |
neon: using the Shim plugin behavior? |
# |
Feb 9th 2018, 12:30 |
loginews |
In a table T there are fields X Y and Z. I want Z to be saved as equal to X+Y whenever I edit the record. I am reading https://book.cakephp.org/3.0/en/orm/saving-data.html but I am lost. |
# |
Feb 9th 2018, 12:24 |
spencdev |
stopPropagation and isStopped might work |
# |
Feb 9th 2018, 12:13 |
neon1024 |
I have the nullable issue again today. My beforeMarshal is in the table class, but if the fields are empty. Can I prevent the save at all? Do I just set the `$data` to null? Or should I instead use beforeSave to wholly prevent the save? |
# |
Feb 9th 2018, 12:09 |
admad |
@jotpe great |
# |
Feb 9th 2018, 12:09 |
jotpe |
@admad I'll be able to fix the Bootstrap Paginator this evening |
# |
Feb 9th 2018, 12:08 |
jotpe |
perfect, works @neon1024 :+1: |
# |
Feb 9th 2018, 12:06 |
neon1024 |
`$conditions = []; if ($thing) { $conditions['id'] = $thing; }; $this->find('all', $conditions);` |
# |
Feb 9th 2018, 12:05 |
neon1024 |
Why not pre-build the conditions array? |
# |
Feb 9th 2018, 12:05 |
jotpe |
I have `public function getMassMailData(array $entityIds = [])` and `$entities = $this->find('all', ['conditions' => [$this->alias . '.id' => $entityIds],...` |
# |
Feb 9th 2018, 12:05 |
neon1024 |
Agreed, Vue.js does make jQuery seem a bit retarded |
# |
Feb 9th 2018, 12:04 |
admad |
vuejs is great when you need just some sprinkling of js in your app/site |
# |
Feb 9th 2018, 12:04 |
jotpe |
hey folks. In Cake2x, is there a possibility to set a conditions wildcard? E.g. I have a method with a param (Id's). When the param is passed the Id's should be used as find condition. If the param is not given, it should retrieve all |
# |
Feb 9th 2018, 12:00 |
birdy247 |
Loving vue.js with inline templates and cake :slightly_smiling_face: |
# |
Feb 9th 2018, 11:48 |
birdy247 |
works |
# |
Feb 9th 2018, 11:48 |
birdy247 |
return Date::createFromFormat('d/m/Y', $occasion->date->format('d/m/Y')); |
# |
Feb 9th 2018, 11:46 |
birdy247 |
I could just createFromFormat |
# |
Feb 9th 2018, 11:46 |
birdy247 |
I was hoping to set it to midnight |
# |
Feb 9th 2018, 11:46 |
hmic |
the interfaces are compatibe, it's just about formatting |
# |
Feb 9th 2018, 11:45 |
birdy247 |
I am doing a lazy load in the price entity |
# |
Feb 9th 2018, 11:45 |
birdy247 |
but the event date is a datetime |
# |
Feb 9th 2018, 11:45 |
birdy247 |
I want to return the event->date |