# |
Dec 1st 2017, 16:51 |
meder |
and all the other fields work fine |
# |
Dec 1st 2017, 16:51 |
meder |
it doesn't save 'leader_id' on newEntity save |
# |
Dec 1st 2017, 16:51 |
phantomwatson |
Er- yeah. |
# |
Dec 1st 2017, 16:51 |
meder |
the opposite |
# |
Dec 1st 2017, 16:51 |
phantomwatson |
Do you mean there's no problem if you only use `newEntity()` but the problem occurs if you use `patchEntity()`? |
# |
Dec 1st 2017, 16:51 |
meder |
it's definitely not validation. this isn't associated, but there are other associated tables being saved (they save fine. everything is fine but this one field) |
# |
Dec 1st 2017, 16:51 |
meder |
why would my entity not save a field with a 'leader_id' on creation but only on patch entity? |
# |
Dec 1st 2017, 14:42 |
hmic |
kant, you just need to pass the 3 function arguments like your api description says |
# |
Dec 1st 2017, 14:42 |
bravo-kernel |
+1 for twig, solid choice/move guys :thumbsup: |
# |
Dec 1st 2017, 14:28 |
hmic |
this is a standalone plain php function, it does not use anything cakephp, it is completely selfcontained |
# |
Dec 1st 2017, 14:27 |
hmic |
one thing to note: you *cannot* indent the multiline strings used! they *need to* start that the beginning of the line. you *cannot* remove the blank lines either! |
# |
Dec 1st 2017, 14:26 |
hmic |
https://gist.github.com/hmic/60ad53de920094db29e303199cc22f96 |
# |
Dec 1st 2017, 14:25 |
hmic |
kant: i did dig out my old solution for you, should be a breeze to do your upload to the api with it: |
# |
Dec 1st 2017, 14:24 |
Guest74638 |
My question is where am I wrong and why the cookie is not deleted from the browser? |
# |
Dec 1st 2017, 14:23 |
Guest74638 |
After logout User logs out but when I see in the browser the Cookie "remember_user" still exists |
# |
Dec 1st 2017, 14:23 |
Guest74638 |
$this->Auth->logout(); $this->Cookie->delete('remember_user'); $this->redirect($this->Auth->logoutRedirect); |
# |
Dec 1st 2017, 14:22 |
Guest74638 |
Hello, I have the following issue: when user logs in my application I create cookie named "remember_user". But when the user clicks logout the Cookie should be deleted. My logout action contains the several lines |
# |
Dec 1st 2017, 14:00 |
kant |
https://gist.github.com/kantsverma/8f0cd60f2d74a39d26bac12b4302b643 |
# |
Dec 1st 2017, 14:00 |
kant |
hmic here is my API format and reponse |
# |
Dec 1st 2017, 14:00 |
hmic |
i'm not |
# |
Dec 1st 2017, 13:59 |
kant |
i only want to post files with json string |
# |
Dec 1st 2017, 13:59 |
kant |
i have mentioned everything there |
# |
Dec 1st 2017, 13:58 |
kant |
hmic can you please check my stack question |
# |
Dec 1st 2017, 13:58 |
hmic |
i've done something like that before, not so much utilizing the cake http client but handcraft it and just file_put_contents with the socket |
# |
Dec 1st 2017, 13:57 |
hmic |
if it's posted form-multipart-data, you need some efforts to create it |
# |
Dec 1st 2017, 13:57 |
hmic |
and you need to craft your request to look like that |
# |
Dec 1st 2017, 13:57 |
hmic |
you need to know! |
# |
Dec 1st 2017, 13:57 |
hmic |
i'm not interested |
# |
Dec 1st 2017, 13:57 |
kant |
yes i can send you the format |
# |
Dec 1st 2017, 13:56 |
hmic |
do you know how the api expects the data? |
# |
Dec 1st 2017, 13:56 |
kant |
how can i post that ? |
# |
Dec 1st 2017, 13:56 |
kant |
hmic simple data is post successfully but i am trying to post image that is not supporting |
# |
Dec 1st 2017, 13:55 |
hmic |
still, you can craft a request like that of course... it's just not very intuitive |
# |
Dec 1st 2017, 13:54 |
hmic |
like a browser would do? so it's basically *no* (rest) api :O |
# |
Dec 1st 2017, 13:54 |
hmic |
kant, so you know by now how the api wants the data posted? :P |
# |
Dec 1st 2017, 13:53 |
hmic |
no offense taken. |
# |
Dec 1st 2017, 13:53 |
dereuromark |
geeze, can someone please deactivate this? |
# |
Dec 1st 2017, 13:53 |
dereuromark |
I totally dont want to "Phillip Emerson" with a designer :P |
# |
Dec 1st 2017, 13:53 |
hmic |
i prefer the "simplicity" too ;) |
# |
Dec 1st 2017, 13:53 |
casmo |
Ow yeah, I think it is good it is supported. My question was not to 'attack' |
# |
Dec 1st 2017, 13:52 |
hmic |
if you dont need to work with a designer, thats totally fine |