# |
Dec 20th 2017, 13:05 |
saeideng |
when you try to get(id) |
# |
Dec 20th 2017, 12:51 |
justcharlz |
hello guys. need help. I am getting "Record not found" when I try retrieving data using get($id). Does result retrieve return boolean or null when I use get($id) |
# |
Dec 20th 2017, 12:01 |
neon1024 |
Question for the core team ;) |
# |
Dec 20th 2017, 12:01 |
neon1024 |
Not sure if the CSRF works via Ajax though |
# |
Dec 20th 2017, 12:00 |
neon1024 |
If I remember my SecurityComponent correctly |
# |
Dec 20th 2017, 12:00 |
neon1024 |
That does mean someone can form tamper you |
# |
Dec 20th 2017, 12:00 |
danishkhan3621 |
@neon1024: after adding $this->Security->config('unlockedActions',array('update')); it started working |
# |
Dec 20th 2017, 11:51 |
neon1024 |
..and it’d be nice if it was compatible with the CakePHP coding standard :P |
# |
Dec 20th 2017, 11:50 |
neon1024 |
So I guess to answer your question, it’s because your code has multiple bugs |
# |
Dec 20th 2017, 11:50 |
neon1024 |
I would guess you’re upgrading a Cake 2 application ;) |
# |
Dec 20th 2017, 11:50 |
neon1024 |
Passing a string of the model name is the Cake 2 way |
# |
Dec 20th 2017, 11:49 |
neon1024 |
You’re also not assigning an entity to your `Form->create()` |
# |
Dec 20th 2017, 11:49 |
dereuromark |
always check logs and stacktrace of debug output |
# |
Dec 20th 2017, 11:49 |
danishkhan3621 |
i'm on cakephp 3 and saving data in session it is working fine without ajax |
# |
Dec 20th 2017, 11:49 |
neon1024 |
Perhaps it’s a routing issue, with the capitalisation of the url? |
# |
Dec 20th 2017, 11:49 |
dereuromark |
True |
# |
Dec 20th 2017, 11:48 |
neon1024 |
Who knows what it’s doing |
# |
Dec 20th 2017, 11:48 |
neon1024 |
Well it’s `saveProduct()` so that method might make an entity |
# |
Dec 20th 2017, 11:48 |
dereuromark |
deprecated stuff doesnt break the cake ;) yet |
# |
Dec 20th 2017, 11:48 |
dereuromark |
the problem is that you cant save arrays, must be patched into entities |
# |
Dec 20th 2017, 11:48 |
dereuromark |
datais fine |
# |
Dec 20th 2017, 11:47 |
neon1024 |
I’ll ignore the odd formatting, but stuff like this, `$this->request->data['count']` isn’t really correct, you should be using `$this->request->getData('count')` if you’re on CakePHP 3.4+ |
# |
Dec 20th 2017, 11:47 |
neon1024 |
Are you in Cake 2 because some of your code looks very Cake 2 |
# |
Dec 20th 2017, 11:46 |
danishkhan3621 |
Why i'm getting error: Bad request when trying to submit post data using ajax in Cakephp 3 , here is my code https://pastebin.com/H5RmnDtF |
# |
Dec 20th 2017, 11:22 |
dereuromark |
Especially in 3.x :slightly_smiling_face: no more sharing, no more issues with depth. and you can easily unit test them |
# |
Dec 20th 2017, 10:50 |
braeden |
Behaviours really are a thing of beauty when you get them to work... |
# |
Dec 20th 2017, 10:32 |
neon1024 |
Thanks for such a quick patch |
# |
Dec 20th 2017, 10:32 |
dereuromark |
nice to hear |
# |
Dec 20th 2017, 10:32 |
neon1024 |
`* @mixin \Muffin\Slug\Model\Behavior\SlugBehavior` |
# |
Dec 20th 2017, 10:32 |
neon1024 |
The latest update has added the correct annotation for my project too |
# |
Dec 20th 2017, 10:31 |
neon1024 |
Your IDE Helper seems to be getting good traction @dereuromark :thumbsup: |
# |
Dec 20th 2017, 10:31 |
neon1024 |
https://twitter.com/YellDavid/status/943082826886414337 |
# |
Dec 20th 2017, 10:30 |
dereuromark |
as long as you are still in :P |
# |
Dec 20th 2017, 10:30 |
dereuromark |
if you apply for anywhere in europe, it wont be hard to manage |
# |
Dec 20th 2017, 10:30 |
neon1024 |
Pick your level of evil |
# |
Dec 20th 2017, 10:30 |
neon1024 |
Well I only have UK and US passports :( |
# |
Dec 20th 2017, 10:30 |
hmic |
on another note, sure |
# |
Dec 20th 2017, 10:29 |
dereuromark |
its probably smart to get out of GB before the crisis hit.. |
# |
Dec 20th 2017, 10:28 |
hmic |
as thats like going anywhere |
# |
Dec 20th 2017, 10:28 |
hmic |
"moving abroad" is such a funny term beeing used by someone living on an island :D |
# |
Dec 20th 2017, 10:27 |
hmic |
thats what i did read from your "cushy" job description and wanted to alert you off |