# |
Dec 9th 2016, 15:22 |
Neon1024 |
Yep, agreed |
# |
Dec 9th 2016, 15:20 |
hmic |
well. he will come back when savant is around, and it's gonna be a hard debugging session looking at the GH issue... so props to savant for taking it! |
# |
Dec 9th 2016, 15:19 |
hmic |
me too... |
# |
Dec 9th 2016, 15:19 |
Neon1024 |
¯\_(ツ)_/¯ |
# |
Dec 9th 2016, 15:18 |
Neon1024 |
Oh, that chap left, was about to offer some thougts |
# |
Dec 9th 2016, 15:17 |
luv2quit |
Neon1024: no, thank you! |
# |
Dec 9th 2016, 15:17 |
Neon1024 |
Haha, thanks luv2quit |
# |
Dec 9th 2016, 15:16 |
luv2quit |
Neon1024: thank you! you are great! |
# |
Dec 9th 2016, 15:15 |
Neon1024 |
cakephp701: savant is asleep now, he’s usually on EST timezone |
# |
Dec 9th 2016, 15:13 |
cakephp701 |
i need help in fixing this |
# |
Dec 9th 2016, 15:13 |
cakephp701 |
https://github.com/josegonzalez/cakephp-upload/issues/422 |
# |
Dec 9th 2016, 15:13 |
Neon1024 |
and not id |
# |
Dec 9th 2016, 15:13 |
Neon1024 |
Because it’s iD |
# |
Dec 9th 2016, 15:13 |
luv2quit |
In my database i have one table. It has in id column called id. When i do findById the id is split up into i_d in the sql query. So i get an error. Any ideas why id is split into i_d? |
# |
Dec 9th 2016, 15:10 |
Neon1024 |
Although the thought does occur that the empty params might be because I’m using a GET form instead of POST |
# |
Dec 9th 2016, 15:09 |
Neon1024 |
You can see allowEmpty here, https://github.com/CakeDC/search/blob/master/Docs/Documentation/Configuration.md#behavior-and-model-configuration |
# |
Dec 9th 2016, 15:09 |
Neon1024 |
As I am using PrgComponent, and have that exact behaviour, and I’m also reading the docs where it lists ‘allowEmpty’, even shows it in the link I gave |
# |
Dec 9th 2016, 15:08 |
Neon1024 |
Perhaps it does in foc/search, but in Cake 2 cakedc/search it doesnt |
# |
Dec 9th 2016, 15:08 |
Neon1024 |
Well I hate to disagree, but that isn’t actually true |
# |
Dec 9th 2016, 15:04 |
dereuromark |
small thing though |
# |
Dec 9th 2016, 15:04 |
dereuromark |
or, actually, when 0, '0' etc are actually valid values, and '' is the empty one. Then it must not just blindly filter out, but respect this. the other plugin did. |
# |
Dec 9th 2016, 15:03 |
dereuromark |
most of the time it is however possible to map them to a !empty() compatible value in the view layer |
# |
Dec 9th 2016, 15:03 |
dereuromark |
depends on the form data coming in |
# |
Dec 9th 2016, 15:02 |
dereuromark |
when "no" or sth would be equals to empty |
# |
Dec 9th 2016, 15:01 |
admad |
gtg |
# |
Dec 9th 2016, 15:00 |
admad |
what are "custom empty values"? |
# |
Dec 9th 2016, 14:59 |
dereuromark |
thats a limitation now that wasnt there before, but so far that seems to suffice in the cases I encountered |
# |
Dec 9th 2016, 14:58 |
dereuromark |
It only works with !empty() values, not with custom empty values |
# |
Dec 9th 2016, 14:57 |
admad |
so you never have `?foo=` if you use the Prg component |
# |
Dec 9th 2016, 14:56 |
admad |
also the PRG component filters out keys with empty values from query string before redirecting anyway |
# |
Dec 9th 2016, 14:55 |
admad |
there's "filterEmpty" |
# |
Dec 9th 2016, 14:55 |
admad |
there's no "allowEmpty" option for filters |
# |
Dec 9th 2016, 14:53 |
Neon1024 |
The ‘value’ type search, doesn’t seem to care about allowEmpty |
# |
Dec 9th 2016, 14:53 |
Neon1024 |
I mean, I have ‘allowEmpty’ on my ‘brand’, but it’s still making it to the SQL as ‘Brand.slug’ = ‘’ |
# |
Dec 9th 2016, 14:52 |
Neon1024 |
Right, so I can use a beforeFilter or similar to ditch the empty request data |
# |
Dec 9th 2016, 14:49 |
admad |
Neon1024: https://github.com/FriendsOfCake/search/blob/master/src/Controller/Component/PrgComponent.php#L97 |
# |
Dec 9th 2016, 14:49 |
hmic |
dont forget to rebake the table and entity classes (and forms probably) after changing it! |
# |
Dec 9th 2016, 14:49 |
dereuromark |
all fields must be lowercase |
# |
Dec 9th 2016, 14:48 |
dereuromark |
I bet you named your columns wrong in the DB |
# |
Dec 9th 2016, 14:47 |
luv2quit |
Hello. I am a beginner. I am trying to get an item by id but i get this error msg: Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Item.i_d' in 'where clause'. I don't know why it uses Item.i_d. It shold be Item.id |
# |
Dec 9th 2016, 14:39 |
dereuromark |
not sure of that feature of mine ever got ported to the other search plugin :slightly_smiling_face: |