Log message #4050495

# At Username Text
# Jul 11th 2017, 10:16 jarard01 I thought this might work: $endPeriod = new FrozenTime($period->end_date);
# Jul 11th 2017, 10:05 hmic jarard01, as its frozen, you will get a new object back - use this
# Jul 11th 2017, 10:01 jarard01 is it possible to add a day to a frozentime?
# Jul 11th 2017, 09:54 wouter0100 Even when changing afterSave to afterSaveCommit fails. :(
# Jul 11th 2017, 09:52 wouter0100 The nested transaction that's failing is a ->link to a BelongsToMany within an afterSave event.
# Jul 11th 2017, 09:51 wouter0100 ange things, just usual queries that should succeed within the transaction.
# Jul 11th 2017, 09:51 wouter0100 What is the best way to debug an "Cannot commit transaction - rollback() has been already called in the nested transaction" exception? Error only occurs in prod and so hard to debug.. Code is exactly the same, as well as the database and the request. It just seems to rollback within this nested transaction for no reason. Query logs doesn't show str
# Jul 11th 2017, 09:50 abeltolu https://medium.com/@abeltolu/build-a-rest-api-using-cakephp-2-x-in-3-minutes-1abe842ad7a1
# Jul 11th 2017, 09:47 heter have a good sleep ;)
# Jul 11th 2017, 09:47 heter cool, ill wait for hosting providers to look on it and look on server configurations and maybe they will provide me more detailed informations about which differences on configurations causes this
# Jul 11th 2017, 09:46 savant feel free to pm me details
# Jul 11th 2017, 09:46 savant im headed to bed
# Jul 11th 2017, 09:46 heter if u want we can discuss it on priv and i can provide u some more details if u want
# Jul 11th 2017, 09:45 heter i may found some bug on cake mailer, i ran same scripts on 2 different servers using dedicated sendgrid mailer library and it worked on both server but while im using cake mailer its throwing exception on one of them (not sure what may cause it atm)
# Jul 11th 2017, 09:44 savant about to sleep
# Jul 11th 2017, 09:43 heter @savant are u still here ?
# Jul 11th 2017, 09:13 jonasz each day i'm learning more ;)
# Jul 11th 2017, 09:13 savant no problem
# Jul 11th 2017, 09:13 jonasz i understand. thank you for help
# Jul 11th 2017, 09:12 savant the overhead is super minimal
# Jul 11th 2017, 09:12 savant than the inclusion of one more file in your application
# Jul 11th 2017, 09:12 savant its far more likely that you have a sql query that is unnecessarily joining tables which causes a slowdown in your application
# Jul 11th 2017, 09:11 savant and then that stat call will be cached by the operating system
# Jul 11th 2017, 09:11 savant since the file will be stat’d once
# Jul 11th 2017, 09:11 savant there is minimal overhead on including another file
# Jul 11th 2017, 09:11 jonasz thx, that is exactly what i was looking for ;)
# Jul 11th 2017, 09:11 savant again, as @glanceded said, elements or helpers would be better suited to this problem
# Jul 11th 2017, 09:11 savant which is better done at the user-level
# Jul 11th 2017, 09:10 savant its just not possible to do what you’re asking without some hokey-pokey extra logic
# Jul 11th 2017, 09:10 savant (or whatever the equivalent is
# Jul 11th 2017, 09:10 savant `echo str_replace('some_var', 'derp', $this->fetch('sidebar'))`
# Jul 11th 2017, 09:10 jonasz aha, i get u now
# Jul 11th 2017, 09:10 savant but then, why cant you just do the following
# Jul 11th 2017, 09:10 savant for instance
# Jul 11th 2017, 09:09 savant `{{some_var}}`
# Jul 11th 2017, 09:09 savant so we’d need to come up with some alternative syntax for embedding variables
# Jul 11th 2017, 09:09 savant not when you call `$this->fetch('sidebar', ['some_var' => 'derp']);`
# Jul 11th 2017, 09:09 savant as is, the `$some_var` is interpolated at the time of the entire template inclusion
# Jul 11th 2017, 09:08 savant lets say you want to use that element elsewhere
# Jul 11th 2017, 09:08 savant $this->start(‘some-element’); echo “derp ${some_var}“; $this->end();
# Jul 11th 2017, 09:07 savant consider the following