# |
Feb 2nd 2018, 11:23 |
rudy1976s |
good morning! |
# |
Feb 2nd 2018, 10:51 |
hmic |
ooskar1233: i can certainly hack the hell out of it, but i was looking for a proper solution. which does just not exist from what i've seen now. :$ |
# |
Feb 2nd 2018, 10:51 |
neon1024 |
@hmic Oh yeah! Hah, brain fail |
# |
Feb 2nd 2018, 10:49 |
hmic |
it's set in app.php |
# |
Feb 2nd 2018, 10:49 |
neon1024 |
Falls back to server env right? |
# |
Feb 2nd 2018, 10:49 |
LubosR |
Also I see I can't pass multiple args when they are not specified in OptionParser, I am getting Error: Too many arguments. |
# |
Feb 2nd 2018, 10:49 |
ooskar1233 |
@hmic maybe create own view and override `formatTime` and `formatDate`? :slightly_smiling_face: |
# |
Feb 2nd 2018, 10:48 |
neon1024 |
What’s the default for `Configure::read('App.defaultLocale')` |
# |
Feb 2nd 2018, 10:47 |
hmic |
ic, the formatting is hardcoded in the CrudViewHelper to timeAgoInWords() :[ |
# |
Feb 2nd 2018, 10:45 |
LubosR |
Hi there, is it possible to pass array argument to shell subcommand from command line? Might be nonsense, I may use multiple arguments and then use $this->args array, right? |
# |
Feb 2nd 2018, 10:45 |
LubosR |
Hi there, is it possible to pass argument to shell subcommand from command line? Might be nonsense, I may use multiple arguments and then use $this->args array, right? |
# |
Feb 2nd 2018, 10:07 |
arnis |
another question - is it possible to return field instead of a defined variable/value in case statement? For example: ...when discount = true then discounted_price else price... cakephp returns 'discounted_price' or 'price' but not the actual column value |
# |
Feb 2nd 2018, 10:03 |
arnis |
Hi. I have two tabels - products and product_variants (belongsTo to products). Each product_variants row contains a custom price. Can someone help me to figure out how to list all products and sort them by product_variants lowest price? |
# |
Feb 2nd 2018, 10:00 |
hmic |
it's using the "nice" or "human" formatter in the generated views, no matter which format i set in bootstrap and i do need the times in a datetime that just says "2 weeks ago" now :( |
# |
Feb 2nd 2018, 09:59 |
hmic |
anyone using crudview and is able to tell me how to change the output format of date(times)? |
# |
Feb 2nd 2018, 05:44 |
gsitex |
both options are vailable |
# |
Feb 2nd 2018, 04:51 |
turkles |
If I am processing rows in a table and don't want to process anything twice.. better that I have a 'processed' flag? Or just store the last ID after each batch? |
# |
Feb 2nd 2018, 02:21 |
waspinator |
I generated the original pot file using the i18n shell |
# |
Feb 2nd 2018, 02:21 |
waspinator |
and of course my string is wrapped in the `__()` function |
# |
Feb 2nd 2018, 02:19 |
waspinator |
I can't seem to get translated strings to show up. I have a `src/Locale/fr_FR/default.po` file with the `msgid` and translated `msgstr` and I call `I18n::setLocale('fr_FR');`. Right next to the element I call `debug(I18n::getLocale());` and I get `fr_FR`, but the message is still in English. I ran `bin/cake cache clear_all` but it still shows up in English. How can I debug to see if cake is finding the translation? |
# |
Feb 2nd 2018, 01:03 |
gsitex |
This method was auto baked by CakePHP. I have never touched it. |
# |
Feb 2nd 2018, 01:02 |
gsitex |
File uploaded https://cakesf.slack.com/files/U1VHNK3G8/F920PSB1S/error5.jpg / https://slack-files.com/T053DPNCM-F920PSB1S-1909c07411 |
# |
Feb 1st 2018, 23:53 |
ank068 |
Do i need to install memcached for using session in Cakephp 3.x? |
# |
Feb 1st 2018, 21:03 |
etipaced |
I haven’t experienced that but my db and app values are all in UTC. I’m doing timezone conversions in entity accessors. Not sure if that’s best practice, but seems to be working for me. |
# |
Feb 1st 2018, 20:38 |
watermark |
So it seems that chronos sets all dates to utc, even though I have the timezone set in bootstrap. This is causing dates to come out of the database set to utc, which is screwing me. Is there a way to make all dates come out the database in the system timezone? |
# |
Feb 1st 2018, 20:11 |
kailas |
hrm. don’t follow. any pointers in the documentation? |
# |
Feb 1st 2018, 20:08 |
dereuromark |
ideally you have a custom (blob) type set here in your schema, that handles it |
# |
Feb 1st 2018, 19:53 |
kailas |
I have a entity with a blob field. to create a new record, how do I assign a value to the blob? do I need to create a custom setter? or can i just assign whatever data to the field and it’ll save? when i read it’s a file resource and that works, but for my saving it’s just not storing the value I assign to that field |
# |
Feb 1st 2018, 18:40 |
eber |
ow, found out that i don't need to define ids on fixtures... that was the issue... |
# |
Feb 1st 2018, 18:35 |
eber |
can't figure this one out... |
# |
Feb 1st 2018, 18:35 |
eber |
I'm using postgres and fixtures seem to be working just fine but, when I try to save a new record on tests, I get an error saying something about a duplicated id (=1)... |
# |
Feb 1st 2018, 18:34 |
eber |
tks hmic ! I was in a hurry so I removed all those things and kept going with what I could :P now I'm having another weird error ^^ |
# |
Feb 1st 2018, 18:33 |
hmic |
the generic case is "conditinally (not) allowing empty fields" |
# |
Feb 1st 2018, 18:32 |
hmic |
i think this is a design error, but you basically can't change it... |
# |
Feb 1st 2018, 18:32 |
hmic |
eber: you need to use the second param on allowEmpty() or notEmpty() validation method in this case |
# |
Feb 1st 2018, 18:30 |
eber.freitas |
maybe the serial is not being reseted after tearDown? |
# |
Feb 1st 2018, 18:30 |
eber.freitas |
which is weird... |
# |
Feb 1st 2018, 18:30 |
eber.freitas |
i'm getting complains that i have a duplicate id = 1 |
# |
Feb 1st 2018, 18:29 |
eber.freitas |
does anyone have problems with test id's using postgres? |
# |
Feb 1st 2018, 18:03 |
eber |
hey guys... i'm trying to check if a value is empty or not based on the value of another field... i've added a custom rule but and that is the only rule on the field but, for some reason, if the field is empty i get a validation error there and my custom validation doesn't run... if I say ->allowEmpty() my custom function also doesn't run... any ideas? |
# |
Feb 1st 2018, 18:01 |
joopm |
so the page has no any style just "black and white" |