# |
Nov 24th 2017, 22:03 |
joopm |
i need to mixing modells in the create form |
# |
Nov 24th 2017, 22:02 |
joopm |
today i faced with some new challenges |
# |
Nov 24th 2017, 22:02 |
joopm |
good evening to all the community members |
# |
Nov 24th 2017, 18:11 |
andre |
Is there a better way to manage this? |
# |
Nov 24th 2017, 18:10 |
andre |
but this dont work on migration |
# |
Nov 24th 2017, 18:10 |
andre |
File uploaded https://cakesf.slack.com/files/U857JK89G/F857K7726/-.php / https://slack-files.com/T053DPNCM-F857K7726-d164966abc |
# |
Nov 24th 2017, 18:10 |
slackebot2 |
from what is it today? This could also define debug as false if production or test and true if development. In my app I did this: |
# |
Nov 24th 2017, 18:10 |
andre |
Hey guys is there way to define multiple multiple connection to multiple database, one for development, one for tests and other for production. I have found on stack overflow some tips, to get by url and pass many and different settings, so I've improved it on my app, but I realized that when I try to run migrations that don't work because that has no url to pass, Is there another way to do that? Or do you intend to manage app mode different |
# |
Nov 24th 2017, 17:29 |
alysson-azevedo |
thank you very much |
# |
Nov 24th 2017, 17:29 |
admad |
@alysson-azevedo ^ |
# |
Nov 24th 2017, 17:28 |
admad |
https://github.com/cakephp/app/blob/master/config/app.default.php#L144 |
# |
Nov 24th 2017, 17:21 |
alysson-azevedo |
Hi. How can i prevent an expecific exception (\Cake\Network\Exception\UnauthorizedException) from being logged on error.log ? |
# |
Nov 24th 2017, 16:55 |
inoas |
@WyriHaximus - but have a great weekend nevertheless :) |
# |
Nov 24th 2017, 16:53 |
inoas |
because right now you can even read the database credentials, nothing dumb about that |
# |
Nov 24th 2017, 16:51 |
inoas |
Okay, I don't agree obviously, because if templates should be dumb then the a function like config that reads its context should not be there in the first place and rather everything should be pushed. If you violate that principle then I prefer if things can also fail. Configure::read() is a bad design by default. But no worries :) |
# |
Nov 24th 2017, 16:48 |
inoas |
just if you desire |
# |
Nov 24th 2017, 16:38 |
WyriHaximus |
inoas: honestly I'm unsure about that, will comment specifics in that issue |
# |
Nov 24th 2017, 16:01 |
inoas |
WyriHaximus: merge it and ping me I will copy it add configOrFail() if you desire |
# |
Nov 24th 2017, 15:35 |
neon1024 |
Mostly because GET !== POST |
# |
Nov 24th 2017, 15:34 |
neon1024 |
Ah, well yes, nevermind. As `0 !== 5` |
# |
Nov 24th 2017, 15:33 |
neon1024 |
Another, possibly blonde moment. My query returns 4 results, but when I put it through the paginator I get an empty result set |
# |
Nov 24th 2017, 15:16 |
casmo |
That after-dinner dip boosted by coffee... ;-) |
# |
Nov 24th 2017, 15:16 |
casmo |
post lunch is te best |
# |
Nov 24th 2017, 14:55 |
JD-Robbs |
But same here - post lunch, pre weekend lull |
# |
Nov 24th 2017, 14:55 |
JD-Robbs |
Yeah, empty elements tend to render blank :D |
# |
Nov 24th 2017, 14:55 |
neon1024 |
That’s my excuse :P |
# |
Nov 24th 2017, 14:55 |
neon1024 |
Er, post lunch lull |
# |
Nov 24th 2017, 14:55 |
neon1024 |
Ah, well it is working. Just my element wasn’t outputting anything, lol |
# |
Nov 24th 2017, 14:53 |
JD-Robbs |
Sure $this->render('/Element/myelement'); |
# |
Nov 24th 2017, 14:52 |
neon1024 |
I’m just getting a blank response, no markup |
# |
Nov 24th 2017, 14:52 |
neon1024 |
For ajaxing, is it still possible in Cake 3 to return an element from the controller? |
# |
Nov 24th 2017, 14:51 |
neon1024 |
ksandeep, You don’t need to as the AuthComponent will take care of that for you |
# |
Nov 24th 2017, 13:31 |
ksandeep_ |
i mean by code how to check if page is white list to access without login? |
# |
Nov 24th 2017, 13:31 |
ksandeep_ |
hi frnds, how to check if login required to access a page. |
# |
Nov 24th 2017, 13:24 |
ziemmowit |
@voycey the thing is, I want those errors to happen. Reasons above. |
# |
Nov 24th 2017, 13:22 |
slackebot2 |
$this->redirect(['action' => 'index']); } I searched whole internet, but nothing helped. Tried \PDOException etc., and still nothing. CakePHP 3.5 (PHP 5) |
# |
Nov 24th 2017, 13:22 |
ziemmowit |
Hi, I will repeat my question, maybe someone will know the answer. I need to catch the exception on query in controller. Query depends on user input, so It is possible(and probable) that many times user will generate error. I tried this: try { $q = $this->MyClass->find('all'); [some joins] $q->where($string_based_on_user_input); $q->order($another_string_based_on_user_input) } catch(\Exception $e) { return |
# |
Nov 24th 2017, 12:43 |
neon1024 |
Ah, you can pass it via settings. That’s sensible :slightly_smiling_face: |
# |
Nov 24th 2017, 12:42 |
neon1024 |
I want to paginate via ajax, how do I tell the paginator which page I want? Just set the query param in the request? |
# |
Nov 24th 2017, 12:23 |
neon1024 |
Noone wants to read all that spaff |
# |
Nov 24th 2017, 12:23 |
neon1024 |
Or at least quote your code as code |