# |
Jul 20th 2017, 14:43 |
eBugg |
jeremyharris: AFAIK I don't use any extended helper... and it only happens with that one field. The other ones in the same form are fine. |
# |
Jul 20th 2017, 14:42 |
inoas |
so thats the way to do it I assume $this->set(['locales' => $locales, '_serialize' => $this->viewVars['_serialize'] + ['locales']); |
# |
Jul 20th 2017, 14:41 |
admad |
hmm maybe, i dont remember :slightly_smiling_face: |
# |
Jul 20th 2017, 14:41 |
eBugg |
admad I think step comes from the attributes of the field in the DB |
# |
Jul 20th 2017, 14:40 |
jeremyharris |
and custom widgets for that matter |
# |
Jul 20th 2017, 14:40 |
jeremyharris |
eBugg look at your form templates, and any extended helper you might be using. |
# |
Jul 20th 2017, 14:40 |
admad |
eBugg: the step="0.000001" is also not default. You probably have a custom formhelper with overridden methods |
# |
Jul 20th 2017, 14:40 |
neon1024 |
Presumably that’s why the template is being changed based on the request :slightly_smiling_face: |
# |
Jul 20th 2017, 14:39 |
neon1024 |
@shuyi The RequestHandler component wraps logic for dealing with requests, request headers, and such. Like returning json when a request has a Content-Type: application/json header |
# |
Jul 20th 2017, 14:39 |
eBugg |
how do I get rid of the 'disabled' ? |
# |
Jul 20th 2017, 14:39 |
eBugg |
I end up with this <input name="data[OperacionVenta][precio_directo_euro]" step="0.000001" id="OperacionVentaPrecioDirectoEuro" disabled="" type="number"> |
# |
Jul 20th 2017, 14:38 |
eBugg |
how comes a simple echo $this->Form->input('precio_directo_euro'); inserts a 'disabled' tag in the HTML output ??? |
# |
Jul 20th 2017, 14:38 |
admad |
maybe we should have a getter for view vars |
# |
Jul 20th 2017, 14:37 |
eBugg |
hi... |
# |
Jul 20th 2017, 14:37 |
inoas |
admad okay ... no getter then |
# |
Jul 20th 2017, 14:37 |
admad |
builder is for config only |
# |
Jul 20th 2017, 14:37 |
shuyi |
I have no idea what RequestHandlerComponent does actually ... feel like I can just remove it |
# |
Jul 20th 2017, 14:37 |
admad |
it's just $this->viewVars['_serialize'] |
# |
Jul 20th 2017, 14:37 |
shuyi |
yup |
# |
Jul 20th 2017, 14:37 |
admad |
view vars dont go into builder |
# |
Jul 20th 2017, 14:36 |
inoas |
let me see if I can figure it out brb |
# |
Jul 20th 2017, 14:36 |
inoas |
yeah obviously |
# |
Jul 20th 2017, 14:36 |
inoas |
so how would I get _serialize key? $this->viewBuilder->get? |
# |
Jul 20th 2017, 14:36 |
admad |
that _serialize var that is |
# |
Jul 20th 2017, 14:36 |
admad |
read, merge, write |
# |
Jul 20th 2017, 14:36 |
admad |
yes |
# |
Jul 20th 2017, 14:36 |
inoas |
is that how it is supposed to work? |
# |
Jul 20th 2017, 14:36 |
inoas |
but when doing so my previous serialization gets overwritten |
# |
Jul 20th 2017, 14:35 |
inoas |
I then also want to serialize something in beforeRender |
# |
Jul 20th 2017, 14:35 |
admad |
`$controller->viewBuilder()->templatePath() .= DS . $type;` ain't gonna work even in php 7 |
# |
Jul 20th 2017, 14:35 |
neon1024 |
Could eliminate a potential possibility though |
# |
Jul 20th 2017, 14:35 |
inoas |
I have a actions that serialize variables |
# |
Jul 20th 2017, 14:35 |
admad |
that aint gonna help if the problem is in app code :slightly_smiling_face: |
# |
Jul 20th 2017, 14:34 |
neon1024 |
`rm -rf vendor andand composer update andand bin/cake orm_cache build` #NukeItFromOrbit :P |
# |
Jul 20th 2017, 14:34 |
shuyi |
hmm, even weirder, ```PHP Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 8192 bytes) in /vendor/composer/ClassLoader.php on line 444``` , I have my memory limit set to 1024MB in php.ini ... |
# |
Jul 20th 2017, 14:29 |
shuyi |
Let me try 7 |
# |
Jul 20th 2017, 14:28 |
hmic |
i bet on 7.x it runs ;) |
# |
Jul 20th 2017, 14:28 |
hmic |
the return values cannot be used in writecontext is an php error that got fixed/mitigated sometime ago IMHO |
# |
Jul 20th 2017, 14:28 |
neon1024 |
Would be my guess at least |
# |
Jul 20th 2017, 14:28 |
neon1024 |
It’ll be in AppController |
# |
Jul 20th 2017, 14:28 |
neon1024 |
You’ll have to assign the method return and concat the string afterwards |