# |
Mar 17th 2018, 13:46 |
dereuromark |
in this case copy over might be easier now |
# |
Mar 17th 2018, 13:46 |
dereuromark |
then you should have used habtm :slightly_smiling_face: a pivot table |
# |
Mar 17th 2018, 13:45 |
bakro.istvan |
My users hasmany pics. How can I link/add an already existing pic to a user, without recreating the already existing linking records. |
# |
Mar 17th 2018, 11:28 |
xinobi |
does cakephp provides any filter against Host Header Attacks? |
# |
Mar 17th 2018, 11:18 |
xinobi |
Is it possible to sort associations with select strategy? https://discourse.cakephp.org/t/sort-from-view-with-when-using-hasone-associations/3976/2 |
# |
Mar 17th 2018, 08:24 |
saeideng |
`debug($application)` |
# |
Mar 17th 2018, 08:22 |
admad |
hoping doesn't always work :slightly_smiling_face: where exactly did you set the var in app controller? |
# |
Mar 17th 2018, 08:17 |
clementcrown |
$application was set in the AppController, so I hope, it should be visible in every area of the application |
# |
Mar 17th 2018, 08:17 |
admad |
based on the error msg it's obvious that `$application` var is not set |
# |
Mar 17th 2018, 08:14 |
clementcrown |
side_menu.ctp is an element and it is rendered in the defult.ctp |
# |
Mar 17th 2018, 08:14 |
clementcrown |
File uploaded https://cakesf.slack.com/files/U59RBAFS6/F9SK2EYKH/-.txt / https://slack-files.com/T053DPNCM-F9SK2EYKH-5cec2adcdb - that is the content of the side_menu.ctp |
# |
Mar 17th 2018, 08:11 |
saeideng |
probably you don't load Helper |
# |
Mar 17th 2018, 08:10 |
saeideng |
you try to use a property on non-object |
# |
Mar 17th 2018, 08:09 |
saeideng |
@clementcrown click on `notice (8)` on error |
# |
Mar 17th 2018, 08:03 |
clementcrown |
File uploaded https://cakesf.slack.com/files/U59RBAFS6/F9SK1BCJ3/image.png / https://slack-files.com/T053DPNCM-F9SK1BCJ3-c3938b366d |
# |
Mar 17th 2018, 07:24 |
Tannheuser84 |
I rode something about apache permissions, but I am not sure what exactly those permissions should be and how do i set them |
# |
Mar 17th 2018, 07:23 |
Tannheuser84 |
What am I missing? |
# |
Mar 17th 2018, 07:23 |
Tannheuser84 |
Good morning! CakePHP ignores my custom loca...i did an i18n extract, renamed that default.pot to default.po, placed it under src/Locale/ca_ES and modified both config/app.php and config/app.default.php, and deleted /tmp/cache/persistent... |
# |
Mar 17th 2018, 04:45 |
royalty |
is this because of how i've configured nginx? |
# |
Mar 17th 2018, 04:44 |
royalty |
and i don't see a cakephp 404 page |
# |
Mar 17th 2018, 04:44 |
royalty |
but 404 errors show nginx errors |
# |
Mar 17th 2018, 04:44 |
royalty |
this may be out the scope of php |
# |
Mar 16th 2018, 17:57 |
watermark |
neon1024: The up makes breaking changes, so I want to prevent someone from going back |
# |
Mar 16th 2018, 16:41 |
neon1024 |
If you set an empty `down()` method wouldn’t that just not do anything |
# |
Mar 16th 2018, 16:32 |
watermark |
Using migrations, if I wanted to prevent a particular migration from rolling back, is the best way to throw an exception in down()? Breakpoints don't seem to be set-able from the migration file itself. |
# |
Mar 16th 2018, 16:26 |
xinobi |
I'm sure this association is malformed as it won't return expected results https://pastebin.com/V5KjsaSn |
# |
Mar 16th 2018, 16:19 |
joopm |
but thats not the best |
# |
Mar 16th 2018, 16:19 |
joopm |
at the moment only 777 allow for me to upload files |
# |
Mar 16th 2018, 16:18 |
joopm |
i have a cakeproject on a linux server,i would like to ask that what is the best chmod for a user directory to enable file upload |
# |
Mar 16th 2018, 16:17 |
joopm |
hello all |
# |
Mar 16th 2018, 16:13 |
flavius |
``` ->contain(['Replies' => function ($q) { return $q ->where(['Replies.client_id' => $this->Selection->client['id']]) ->order(['Replies.created_time' => 'ASC']); }]); ``` |
# |
Mar 16th 2018, 16:12 |
flavius |
`->contain(['Posts' => ['fields' => ['fd']]])` |
# |
Mar 16th 2018, 16:12 |
flavius |
depends on the complexity, i use both |
# |
Mar 16th 2018, 16:07 |
saeideng |
``` ->select() ->contain() ``` ? |
# |
Mar 16th 2018, 15:59 |
neon1024 |
Do you guys n gals prefer using a callback with `->select()` inside your contains or you do use array `fields => []` ? |
# |
Mar 16th 2018, 15:54 |
neon1024 |
Just be careful that you don’t clear your entire cache too frequently, as it will cost you to rebuild it each time |
# |
Mar 16th 2018, 15:53 |
neon1024 |
https://book.cakephp.org/3.0/en/core-libraries/events.html |
# |
Mar 16th 2018, 15:53 |
neon1024 |
Then the final piece of the puzzle is just listening to the correct events |
# |
Mar 16th 2018, 15:53 |
neon1024 |
Book has a page on clearing cache also |
# |
Mar 16th 2018, 15:53 |
neon1024 |
https://book.cakephp.org/3.0/en/core-libraries/caching.html#clearing-cached-data |
# |
Mar 16th 2018, 15:52 |
neon1024 |
Sure, try the source code. https://github.com/cakephp/cakephp/blob/master/src/Shell/CacheShell.php#L67-L91 |