# |
Jul 23rd 2018, 10:15 |
portilloster |
File uploaded https://cakesf.slack.com/files/U9CUM170B/FBUCJD96U/-.php / https://slack-files.com/T053DPNCM-FBUCJD96U-975d477984 |
# |
Jul 23rd 2018, 10:14 |
portilloster |
Hi guys! I´m having problems trying to upload a image. I have a controller with a method where the user can edit some of his information, user picture included. When I debug the variable that contain the picture file I just get the name of the file 'name.extension' instead of the array file. |
# |
Jul 23rd 2018, 10:07 |
fvanhest |
I’ll have to look within our own application. The $data property remains empty when it is injected in the controller. At the point that the an action (crud) is invoked, the property is filled. |
# |
Jul 23rd 2018, 10:01 |
neon1024 |
But it will be set very early, yes, as it’ll be present in the Middleware :slightly_smiling_face: |
# |
Jul 23rd 2018, 10:00 |
neon1024 |
Only if the deprecated class is still being used |
# |
Jul 23rd 2018, 09:57 |
fvanhest |
@neon1024 Thanks. The $data property is set at https://github.com/cakephp/cakephp/blob/master/src/Http/ServerRequest.php#L361 |
# |
Jul 23rd 2018, 09:53 |
neon1024 |
..and you can see the building the Request object |
# |
Jul 23rd 2018, 09:53 |
neon1024 |
Which leads back here, https://github.com/cakephp/cakephp/blob/master/src/Http/Server.php#L85 |
# |
Jul 23rd 2018, 09:52 |
neon1024 |
This is the kick off afaik, https://github.com/cakephp/app/blob/master/webroot/index.php#L37 |
# |
Jul 23rd 2018, 09:52 |
neon1024 |
Ah, it’s been deprecated, https://github.com/cakephp/cakephp/blob/master/src/Http/ServerRequestFactory.php#L30-L60 |
# |
Jul 23rd 2018, 09:52 |
neon1024 |
@fvanhest https://github.com/cakephp/cakephp/blob/master/src/Http/ServerRequest.php#L239-L256 |
# |
Jul 23rd 2018, 09:45 |
mr.mjsm |
File uploaded https://cakesf.slack.com/files/UBN7KUDRA/FBUC3ES9W/pasted_image_at_2018_07_23_12_43_pm.png / https://slack-files.com/T053DPNCM-FBUC3ES9W-8ceecd9405 - so guys, I have this relation between a server and a user. a user can mange many servers and a server can be manages by many users. now i am able to get the user_ids for a given server. but i dont know how to get the name to display the names in the index page of the servers |
# |
Jul 23rd 2018, 09:40 |
fvanhest |
Good morning, at what point is the property $data of ServerRequested filled? In the initialize method of a controller, the data property is still empty, but in the action it has the post values. |
# |
Jul 23rd 2018, 09:38 |
mr.mjsm |
morning neon, morning all |
# |
Jul 23rd 2018, 07:41 |
neon1024 |
Morning all |
# |
Jul 23rd 2018, 06:56 |
VR__ |
anyone can answer this question https://stackoverflow.com/questions/51456448/association-data-is-not-saved-in-cakephp-3-6?noredirect=1 |
# |
Jul 23rd 2018, 06:55 |
VR__ |
anyone can answer this questionhttps://stackoverflow.com/questions/51456448/association-data-is-not-saved-in-cakephp-3-6?noredirect=1 |
# |
Jul 23rd 2018, 04:30 |
chinpei215 |
@thuyhyvg Where did it occur? Please check the stack trace. I think you would also need to upgrade some plugins such as DebugKit. |
# |
Jul 23rd 2018, 03:01 |
thuyhyvg |
I upgraded version 2.6 to 2.10 :)) |
# |
Jul 23rd 2018, 02:53 |
escape |
so stick to something suported, or upgrade to current 3.6 :p |
# |
Jul 23rd 2018, 02:52 |
escape |
no php 7.2 there |
# |
Jul 23rd 2018, 02:52 |
escape |
thuyhyvg: have you checked the supported php versions for this old release? |
# |
Jul 23rd 2018, 02:41 |
thuyhyvg |
Hello I'm using PHP 7.2, cakephp 2.10.11. I installed php-mcrypt but still failed "Cannot use 'object' as class name as it is reserved". Can you support me, please ? |
# |
Jul 22nd 2018, 20:17 |
romanj |
how to set header X-Sendfile for all images? |
# |
Jul 22nd 2018, 20:16 |
romanj |
hi |
# |
Jul 22nd 2018, 20:15 |
rj_ |
how to force cake to send headers X-Sendfile for all images? |
# |
Jul 22nd 2018, 20:14 |
rj_ |
join |
# |
Jul 22nd 2018, 19:47 |
dereuromark |
perfect :+1::skin-tone-2: |
# |
Jul 22nd 2018, 19:36 |
druffin |
I ended up setting my hard-coded sql timestamps to FrozenTime instead of DateTime and that did the trick |
# |
Jul 22nd 2018, 19:32 |
dereuromark |
druffin: why are you returning DateTime in the first place? The framework should make you work only with its internal type classes. |
# |
Jul 22nd 2018, 18:33 |
lorenzo |
modify it |
# |
Jul 22nd 2018, 18:33 |
lorenzo |
there is no way around that. DateTime is a PHP class, we cannot modified |
# |
Jul 22nd 2018, 18:33 |
lorenzo |
druffin, that is true |
# |
Jul 22nd 2018, 17:15 |
druffin |
I require DateTime to return as the same format string as FrozenTime |
# |
Jul 22nd 2018, 17:15 |
druffin |
json_encode stringifies DateTime as array, FrozenTime as the format string I set. |
# |
Jul 22nd 2018, 17:14 |
druffin |
There does not seem to be an equivalent for FrozenTime::setToStringFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ"); when it comes to DateTime. |
# |
Jul 22nd 2018, 17:11 |
lorenzo |
what do you mean? |
# |
Jul 22nd 2018, 17:11 |
lorenzo |
arrays? |
# |
Jul 22nd 2018, 15:37 |
druffin |
I added FrozenTime::setToStringFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ"); in my bootstrap which successfully converts my FrozenTime objects to a string, but when I add Time::setToStringFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");, my DateTime objects still return as arrays and not strings. Does someone know how I can accomplish this? |
# |
Jul 22nd 2018, 14:39 |
druffin |
How do I configure Cake to return DateTime objects as DATE_W3C strings instead of an array? |
# |
Jul 22nd 2018, 08:19 |
birdy247 |
making sure it uses the correct priorities i,e plugin, app etc.. |