# |
Nov 27th 2017, 21:21 |
inoas |
this is... arg |
# |
Nov 27th 2017, 21:20 |
inoas |
the directory is nl-NL must be nl_NL |
# |
Nov 27th 2017, 21:20 |
inoas |
arg |
# |
Nov 27th 2017, 21:18 |
inoas |
:( |
# |
Nov 27th 2017, 21:18 |
inoas |
it is very error prone and no feedback anywhere |
# |
Nov 27th 2017, 21:18 |
inoas |
how would you debug on why plugin locales are not being loaded |
# |
Nov 27th 2017, 21:03 |
ravage84 |
I don't like to misuse __debugInfo() for that, but thanks. |
# |
Nov 27th 2017, 21:00 |
saeideng |
__debugInfo()['columns'] |
# |
Nov 27th 2017, 21:00 |
saeideng |
@ravage84 |
# |
Nov 27th 2017, 20:40 |
burzum |
I think so. havent checked it for some time because it didn't generate any revenue |
# |
Nov 27th 2017, 20:34 |
inoas |
burzum is it still online? |
# |
Nov 27th 2017, 20:34 |
inoas |
erikj I think there is that cakephp jobs page |
# |
Nov 27th 2017, 20:34 |
inoas |
booked to the tips of my ears :E |
# |
Nov 27th 2017, 20:16 |
erikj |
Any Cake Developers out there interested in some side work? |
# |
Nov 27th 2017, 20:14 |
inoas |
seems more often than not we want toList not toArray |
# |
Nov 27th 2017, 20:13 |
inoas |
versus [] (0 index array) |
# |
Nov 27th 2017, 20:13 |
inoas |
aka "2" : { } |
# |
Nov 27th 2017, 20:13 |
inoas |
otherwise the hash keys are non incremental and that cannot be converted to json outside of being an object |
# |
Nov 27th 2017, 20:13 |
inoas |
calling toList is the key |
# |
Nov 27th 2017, 20:13 |
inoas |
ah |
# |
Nov 27th 2017, 20:11 |
inoas |
not just the outer layer of the collection? |
# |
Nov 27th 2017, 20:10 |
inoas |
is there an easy way to convert everything to array? |
# |
Nov 27th 2017, 20:10 |
inoas |
it seems that only the outer structure gets converted back to an array while the inner structures stay objects and json_encode then makes objects instead of arrays |
# |
Nov 27th 2017, 20:10 |
inoas |
I am using Collection::filter in some cases and not in others... however the Json I encode by it is different depending if I used collection($array)->...->toArray() |
# |
Nov 27th 2017, 19:32 |
ravage84 |
OK, thanks @admad |
# |
Nov 27th 2017, 19:31 |
admad |
i would think the latter |
# |
Nov 27th 2017, 19:30 |
ravage84 |
Is it by design or simply because it wasn't implemented yet? |
# |
Nov 27th 2017, 19:30 |
admad |
@ravage84 there isn't |
# |
Nov 27th 2017, 19:27 |
arnis |
also.. maybe my db structure is wrong? |
# |
Nov 27th 2017, 19:27 |
arnis |
hi, guys. Anyone awake? :) advice wanted. So, I have such an code fragment - https://gist.github.com/arneefreeman/ea2f018a78c2097fc608d1b82ef19008 I'm wondering if I could somehow include products count in my $attributes (via $query->func()->count() maybe?) ? Products belongsToMany attributeValues, attributeValues belongsTo attributes. |
# |
Nov 27th 2017, 19:13 |
ravage84 |
Is there another way for getting the full list of columns with their schema data out of TableSchema apart from first getting the list of column names through https://api.cakephp.org/3.5/class-Cake.Database.Schema.TableSchema.html#_columns and then iterate over them by using https://api.cakephp.org/3.5/class-Cake.Database.Schema.TableSchema.html#_getColumn ? |
# |
Nov 27th 2017, 18:53 |
casmo |
fieldlist seems good |
# |
Nov 27th 2017, 18:53 |
casmo |
Allright |
# |
Nov 27th 2017, 18:51 |
dereuromark |
or both work together: validator sets the required fields, and the entity patching only inputs what is expected (by whitelisting and ignoring the rest) |
# |
Nov 27th 2017, 18:50 |
dereuromark |
but also inside each validator as requirePresence() etc |
# |
Nov 27th 2017, 18:50 |
dereuromark |
usually on patchEntity() or newEntity(), yeah |
# |
Nov 27th 2017, 18:48 |
casmo |
I saw this: https://book.cakephp.org/3.0/en/core-libraries/validation.html#requiring-field-presence but putting it to "false" doesn't work |
# |
Nov 27th 2017, 18:46 |
casmo |
Yeah, but fieldList is in my controller, right? |
# |
Nov 27th 2017, 18:46 |
dereuromark |
see fieldList option and whitelisting in general (as opposed to blacklisting) |
# |
Nov 27th 2017, 18:45 |
dereuromark |
rest will simply be ignored, thats the best practice. |
# |
Nov 27th 2017, 18:45 |
dereuromark |
most dont check on what is not supposed to be preset, but rather the opposite :slightly_smiling_face: |