# |
Sep 21st 2019, 18:39 |
noel |
Hi guys. Can someone please help me to set up error exception renderer for JSON API? The docs here are apparently out of date: https://crud-json-api.readthedocs.io/en/latest/preface/setup.html, what's shown there doesn't work. |
# |
Sep 21st 2019, 16:53 |
peppejaripappalardo |
thx anyway |
# |
Sep 21st 2019, 16:53 |
peppejaripappalardo |
np @destinydriven |
# |
Sep 21st 2019, 14:22 |
destinydriven |
Sysmo, sorry I can’t be of much help |
# |
Sep 21st 2019, 10:04 |
peppejaripappalardo |
thx @destinydriven i saw it, but the error persist |
# |
Sep 21st 2019, 09:24 |
destinydriven |
@peppejaripappalardo ^ |
# |
Sep 21st 2019, 09:20 |
destinydriven |
You have duplicate key ‘duration’ |
# |
Sep 21st 2019, 09:18 |
peppejaripappalardo |
some hint please? :S |
# |
Sep 21st 2019, 09:18 |
slackebot |
],` |
# |
Sep 21st 2019, 09:18 |
peppejaripappalardo |
`'_cake_core_' => [` ` 'className' => RedisEngine::class,` ` 'prefix' => 'myapp_cake_core_',` ` 'path' => CACHE . 'persistent/',` ` 'serialize' => true,` ` 'duration' => '+1 years',` ` 'host' => 'gjnas.serveftp.com',` ` 'password' => '*****',` ` 'database' => 0,` ` 'port' => 6379,` ` 'duration' => '+24 hours',` ` |
# |
Sep 21st 2019, 09:18 |
peppejaripappalardo |
`Cache engine Cake\Cache\Engine\RedisEngine is not properly configured` |
# |
Sep 21st 2019, 09:18 |
peppejaripappalardo |
Got an issue with cache |
# |
Sep 21st 2019, 09:18 |
peppejaripappalardo |
Hi all |
# |
Sep 21st 2019, 09:07 |
destinydriven |
Elasty, thanks. Reciprocated |
# |
Sep 21st 2019, 09:04 |
adam282 |
True. I don’t use it absolutely every where though I try my best to. Sorry I couldn’t help any better. I am out, have a good one. |
# |
Sep 21st 2019, 09:04 |
destinydriven |
No worries, there’s no law saying that FormHelper has to be used all the time |
# |
Sep 21st 2019, 09:03 |
destinydriven |
same difference |
# |
Sep 21st 2019, 09:02 |
destinydriven |
yes |
# |
Sep 21st 2019, 09:02 |
adam282 |
Oh, well no cause you said it works without form builder |
# |
Sep 21st 2019, 09:02 |
adam282 |
It might not be Cake interpreting it but PHP |
# |
Sep 21st 2019, 09:01 |
adam282 |
Try `echo $this->Form->hidden("DailyHour.{$i}.employee_id", ['value' => $key, 'id' => false]);` |
# |
Sep 21st 2019, 09:00 |
destinydriven |
yes, exactly |
# |
Sep 21st 2019, 09:00 |
adam282 |
CakePHP is interpreting `<%= key %>` instead of showing that exactly |
# |
Sep 21st 2019, 09:00 |
adam282 |
Oh, I see what you’re saying. |
# |
Sep 21st 2019, 08:59 |
destinydriven |
echo “<input name=‘data[DailyHour][{$i}][employee_id]’ class=‘form-control’ value=‘{$key}’ type=‘hidden’>“; works just fine |
# |
Sep 21st 2019, 08:59 |
destinydriven |
I can get it to work by not using FormHelper though. Was just wondering |
# |
Sep 21st 2019, 08:59 |
adam282 |
Looks like a wanna jQuery |
# |
Sep 21st 2019, 08:59 |
destinydriven |
thanks for the attempt :) |
# |
Sep 21st 2019, 08:58 |
adam282 |
Hm, never worked with it. Sorry. |
# |
Sep 21st 2019, 08:58 |
adam282 |
I would do `<?php echo $key; ?>` |
# |
Sep 21st 2019, 08:58 |
destinydriven |
Elasty, its a template variable from underscore js |
# |
Sep 21st 2019, 08:58 |
adam282 |
I don’t use short open tags |
# |
Sep 21st 2019, 08:58 |
adam282 |
Or something like that. |
# |
Sep 21st 2019, 08:58 |
adam282 |
Should be `<?php= $key ?>` |
# |
Sep 21st 2019, 08:58 |
destinydriven |
yeah, view source has <%= key %> |
# |
Sep 21st 2019, 08:58 |
adam282 |
That’s because you’re missing `$` if it’s a variable |
# |
Sep 21st 2019, 08:57 |
adam282 |
Um, view the source and you should see a hidden field |
# |
Sep 21st 2019, 08:57 |
destinydriven |
its returning <%= key %> instead of the value |
# |
Sep 21st 2019, 08:57 |
adam282 |
What do you mean by properly process? |
# |
Sep 21st 2019, 08:56 |
destinydriven |
In Cake2 is there any way to get FormHelper is properly process a template variable like $key : ‘<%= key %>’; echo $this->Form->hidden(“DailyHour.{$i}.employee_id”, [‘value’ => “{$key}“, ‘id’ => false]); |
# |
Sep 21st 2019, 08:46 |
adam282 |
Oh, and one Authors Controller, if needed. |