# |
Apr 11th 2019, 10:48 |
neon1024 |
Morning all |
# |
Apr 10th 2019, 20:18 |
ricksaccous |
np |
# |
Apr 10th 2019, 20:18 |
hollistergraham123 |
Good idea, I didn’t think to look if it accepted a second parameter. Thanks! |
# |
Apr 10th 2019, 20:17 |
ricksaccous |
with the format you were feeding it? |
# |
Apr 10th 2019, 20:17 |
ricksaccous |
did you try setting the formats array? |
# |
Apr 10th 2019, 20:17 |
ricksaccous |
https://api.cakephp.org/3.4/class-Cake.Validation.Validator.html#_dateTime |
# |
Apr 10th 2019, 20:16 |
hollistergraham123 |
And I did patch entity with that datetime value and got error invalid value |
# |
Apr 10th 2019, 20:16 |
hollistergraham123 |
my validator is set as follows `$validator ->dateTime(‘reminder’) ->allowEmptyDate(‘reminder’);` |
# |
Apr 10th 2019, 20:15 |
ricksaccous |
and cake can handle saving that into db i believe |
# |
Apr 10th 2019, 20:14 |
ricksaccous |
@hollistergraham123... when you patch entity with request data it automatically gets turned into a FrozenTime object (I believe) |
# |
Apr 10th 2019, 20:13 |
hollistergraham123 |
@dereuromark was that towards me that 3.7 supports isostring for datetime? |
# |
Apr 10th 2019, 20:10 |
ricksaccous |
let me re-read the docs on it first lol |
# |
Apr 10th 2019, 20:09 |
ricksaccous |
@dereuromark not sure if you're still around, but your queue plugin works great, was wondering if it had support for seeing history of job failure? I could probably just implement that myself i suppose |
# |
Apr 10th 2019, 19:30 |
dereuromark |
shouldnt that be built in in 3.7? |
# |
Apr 10th 2019, 18:32 |
hollistergraham123 |
Is there a way to get cake to accept 2019-04-10T22:21:00.504Z as a datetime value |
# |
Apr 10th 2019, 16:25 |
tom082 |
I vardumped the get_defined_vars()s and the 2nd email has the first email defined somewhere so as always flipping cache |
# |
Apr 10th 2019, 15:19 |
jeremyharris |
that’s very weird |
# |
Apr 10th 2019, 15:16 |
tom082 |
Just happens in emails sent through the CLI shell |
# |
Apr 10th 2019, 15:16 |
tom082 |
Nope vanilla as it gets |
# |
Apr 10th 2019, 15:15 |
jeremyharris |
and no before/after render shenanigans happening in your views/helpers I’m guessing |
# |
Apr 10th 2019, 15:15 |
jeremyharris |
if that reflects the exact setup you are actually using then I don’t see anything wrong. that’s very odd behavior indeed. do you see a similar issue outside of emails? For example if you have a regular template that loops through that array and uses that element, do you get different results? |
# |
Apr 10th 2019, 15:11 |
tom082 |
https://gist.githubusercontent.com/vaultdweller40/4a02d28ec13bc794735a27aade5476e7/raw/d45b10281d4a6c6985f1a14c1665f3c110aacef8/gistfile1.txt |
# |
Apr 10th 2019, 15:05 |
tom082 |
Sure one sec |
# |
Apr 10th 2019, 15:02 |
jeremyharris |
can you gist your code for the the $email setting as well as the template/element? |
# |
Apr 10th 2019, 15:00 |
tom082 |
both are passed to the template with $email->viewVars($copy); |
# |
Apr 10th 2019, 14:58 |
jeremyharris |
is $copy set on the parent template? I think elements inherit the parent’s view vars, maybe that is messing with it (when you set it via Email::viewVars) |
# |
Apr 10th 2019, 14:56 |
tom082 |
If I echo out the $emailCopy just before the $this->Element it displays the correct value. |
# |
Apr 10th 2019, 14:55 |
jeremyharris |
I haven’t experienced anything like that. are you certain they have different emailCopy? If you set the email body to that variable, is it different? |
# |
Apr 10th 2019, 14:54 |
tom082 |
Are Elements in HTML emails layouts just a bit buggy through CLI? I can flatten it my stuff to not require Elements. It is just a bit weird that $this->Element('blah', ['copy' = $emailCopy]); is the same in email 2 as email 1 when both have different "$emailCopy". Could be my weird PHP setup with MAMP so will try it out on a staging server. |
# |
Apr 10th 2019, 14:44 |
ricksaccous |
i see |
# |
Apr 10th 2019, 14:43 |
jeremyharris |
you can use mutators for those particular fields, e.g. _setOtherAddress, that applied your map fields. then if you set it via ->other_address it would set the normalized fields automatically |
# |
Apr 10th 2019, 14:40 |
ricksaccous |
which isn't the worst thing, but could be nice if the function was called on construct or something |
# |
Apr 10th 2019, 14:40 |
ricksaccous |
right now i have to do entity->setNormalizedFields() to get it to work, hehe |
# |
Apr 10th 2019, 14:38 |
ricksaccous |
this is what i'm dealing with https://gist.github.com/Modicrumb/0c7820e297dcc89ca2307db1bfceb3ba |
# |
Apr 10th 2019, 14:37 |
jeremyharris |
if you are wanting them to call _setMyProperty methods, however, set() with an array will call those setters |
# |
Apr 10th 2019, 14:37 |
tom082 |
Hello, I am having some weird issues with sending out HTML emails with Elements. sending 2 emails one right after the other and the 2nd emails has the 1st emails copy that is generated in an Element within the template. Outside the Element it is correct. I have tried putting ['cache' => false] but to no avail. Any suggestions on where to look would be greatly appreciated. |
# |
Apr 10th 2019, 14:35 |
dereuromark |
you are thinking from the wrong side. those are lazy read-generated, not lazy populated |
# |
Apr 10th 2019, 14:35 |
ricksaccous |
that's the magic i want |
# |
Apr 10th 2019, 14:35 |
ricksaccous |
when you create a _getFullTitle method or something |
# |
Apr 10th 2019, 14:35 |
ricksaccous |
the virtual fields |
# |
Apr 10th 2019, 14:35 |
ricksaccous |
or like |