# |
Jan 18th 2019, 18:15 |
jhall |
https://book.cakephp.org/3.0/en/views/json-and-xml-views.html |
# |
Jan 18th 2019, 18:13 |
yamcomnet |
detects automatically and then tries to render view under json folder automatically when i use $this->render( |
# |
Jan 18th 2019, 18:12 |
jhall |
ah |
# |
Jan 18th 2019, 18:12 |
yamcomnet |
cake is looking rendered template under json |
# |
Jan 18th 2019, 18:12 |
jhall |
could it be based on the type you are setting in the ajax call? |
# |
Jan 18th 2019, 18:11 |
yamcomnet |
{ "message": "Template file \u0022Components\\json\\ajax_products.ctp\u0022 is missing.", "url": "\/components\/store-products", "code": 500, "file": "Components\\json\\ajax_products.ctp", "line": 1565 } |
# |
Jan 18th 2019, 18:11 |
yamcomnet |
ajax request is responded by json |
# |
Jan 18th 2019, 18:10 |
yamcomnet |
no affect. this must be some skeleton appication functionality |
# |
Jan 18th 2019, 18:06 |
jhall |
I do this in one of my controllers. |
# |
Jan 18th 2019, 18:04 |
jhall |
oh are you overriding the response type anywhere? |
# |
Jan 18th 2019, 18:04 |
yamcomnet |
for some reason it formats response as json |
# |
Jan 18th 2019, 18:03 |
jhall |
I have done something like this |
# |
Jan 18th 2019, 18:02 |
jhall |
you can use $this->render(); to render any template you want and then that would be your result in the success of the ajax call |
# |
Jan 18th 2019, 18:00 |
yamcomnet |
basically render normal view instead of ajax view |
# |
Jan 18th 2019, 18:00 |
yamcomnet |
"message": "Template file \u0022Components\\json\\ajax_products.ctp\u0022 is missing.", |
# |
Jan 18th 2019, 17:49 |
yamcomnet |
want to render template to ajax call instead of returning json. not sure howto |
# |
Jan 18th 2019, 16:49 |
half2me |
@steinkel does the `AuthLinkHelper` in `CakeDC/users` support named routes and entity routing? |
# |
Jan 18th 2019, 15:53 |
neon1024 |
But yeah, lots of assumptions! :slightly_smiling_face: |
# |
Jan 18th 2019, 15:53 |
neon1024 |
I think @lorenzo wrote one which has an ORM layer, which would probably be the easiest way |
# |
Jan 18th 2019, 15:52 |
neon1024 |
Which I guess would be better served by proxying to a table class to build the correct query for elasticsearch, but it’ll depend on the library being used to access ES |
# |
Jan 18th 2019, 15:52 |
neon1024 |
I presume they want to use the friendsofcake/search plugin to directly search Elasticsearch |
# |
Jan 18th 2019, 15:48 |
josbeir |
not sure what you are asking |
# |
Jan 18th 2019, 14:40 |
asdfghj |
what can i do ? |
# |
Jan 18th 2019, 14:40 |
asdfghj |
elastic doe snot have tables...... |
# |
Jan 18th 2019, 14:40 |
asdfghj |
because at the moment i am configuring the Search behavior in the Table |
# |
Jan 18th 2019, 14:40 |
asdfghj |
guys how can i use the Search component for elasticsearch ? |
# |
Jan 18th 2019, 14:13 |
ricksaccous |
ruh oh |
# |
Jan 18th 2019, 13:59 |
admad |
scoobie doobie dooo.... |
# |
Jan 18th 2019, 13:53 |
ricksaccous |
that man is my hero, our hero probably |
# |
Jan 18th 2019, 13:53 |
ricksaccous |
@neon1024 yeah ADmad updated it when someone pointed it out to him a couple days ago, haha |
# |
Jan 18th 2019, 12:48 |
neon1024 |
Ah, it’s been updated already. Must me my code is out of date |
# |
Jan 18th 2019, 12:47 |
neon1024 |
However the docblock doesn’t mention false explicity, it’s a guess |
# |
Jan 18th 2019, 12:47 |
neon1024 |
I presume the idea is `->allowEmptyString('table_alias', false)` |
# |
Jan 18th 2019, 12:41 |
neon1024 |
It’s not explicit enough |
# |
Jan 18th 2019, 12:41 |
neon1024 |
I don’t like this change at all |
# |
Jan 18th 2019, 12:38 |
neon1024 |
Why would I require a field with allowEmpty? |
# |
Jan 18th 2019, 12:38 |
neon1024 |
https://github.com/cakephp/cakephp/blob/master/src/Validation/Validator.php#L990-L992 |
# |
Jan 18th 2019, 12:38 |
neon1024 |
I don’t understand this |
# |
Jan 18th 2019, 12:35 |
neon1024 |
I bet this might be because the html will transmit request data as a string right? Before it’s marshalled into correct types |
# |
Jan 18th 2019, 12:35 |
neon1024 |
`->allowEmptyString('id', 'create');` |
# |
Jan 18th 2019, 12:35 |
neon1024 |
Hah |