# |
May 23rd 2018, 11:51 |
bad5ect0r |
Pretty much any error |
# |
May 23rd 2018, 11:51 |
spencdev |
and the error just occurs when there is a missing controller exception, or any 500 error? |
# |
May 23rd 2018, 11:50 |
bad5ect0r |
On bootstrap.php I have it as true. I can see the little cake debug tool at the bottom when there is no internal server error |
# |
May 23rd 2018, 11:50 |
spencdev |
Is your debug set to false? |
# |
May 23rd 2018, 11:49 |
bad5ect0r |
I can do? |
# |
May 23rd 2018, 11:49 |
bad5ect0r |
Hello all. I've been having an annoying error with CakePHP lately. If I try to cause an error such as a missing controller action, rather than rendering those helpful error pages, it just says internal server error occured. I have no idea what I might have changed to cause this problem and now it's getting annoying when debugging. Any idea on what |
# |
May 23rd 2018, 11:10 |
dereuromark |
We really have to improve the CLI commands, they really are not at a modern standard yet, feels a bit like steps backward right now. I invite people to contribute ideas: https://github.com/cakephp/cakephp/issues/12123 |
# |
May 23rd 2018, 10:56 |
neon1024 |
My first thought for things like that would be a View Cell |
# |
May 23rd 2018, 10:17 |
cjquinn |
To clarify this is only for pages that don’t require authentication but the page might be altered if the user is logged in. For example the homepage of the shop shows user recommendations if they are logged in but logged out users can also see the homepage just without any tailored recommendations. |
# |
May 23rd 2018, 10:10 |
cjquinn |
File uploaded https://cakesf.slack.com/files/U1449QQ91/FAULR828J/either_way_this_is_my_current_solution__just_wondering_what_others_approach_was_to_this_problem_.php / https://slack-files.com/T053DPNCM-FAULR828J-7642436f47 |
# |
May 23rd 2018, 10:09 |
cjquinn |
Definitely authentication :slightly_smiling_face: |
# |
May 23rd 2018, 10:08 |
cjquinn |
Yeah not every time just once the session has expired |
# |
May 23rd 2018, 10:08 |
neon1024 |
This sounds like confusion of Authentication with Authorisation |
# |
May 23rd 2018, 10:08 |
neon1024 |
Why would you need to indentify the user every time?! |
# |
May 23rd 2018, 10:08 |
neon1024 |
But but, the Auth info is in the Session usually if you’re using defaults |
# |
May 23rd 2018, 09:54 |
cjquinn |
It’s for an e-commerce shop so the majority of the site doesn’t require authentication until they checkout. Would I just call `$this->Auth->identify()` and set the user before each action that doesn’t require authentication or is that a bad idea? |
# |
May 23rd 2018, 09:51 |
dereuromark |
"where authentication isn’t required" => you dont here :slightly_smiling_face: |
# |
May 23rd 2018, 09:50 |
cjquinn |
Has anyone implemented cookie/remember me authentication? And if so how do you check for a cookie and login in the user on a route where authentication isn’t required? |
# |
May 23rd 2018, 07:47 |
k4t |
yeah |
# |
May 23rd 2018, 07:47 |
admad |
then write your own log engine, would be pretty simple to change the rotation logic :slightly_smiling_face: |
# |
May 23rd 2018, 07:47 |
k4t |
based on this we can create our own Logger I think |
# |
May 23rd 2018, 07:47 |
k4t |
yeah, I noticed that, but unfortunatelly we need days rotation |
# |
May 23rd 2018, 07:46 |
admad |
@k4t file log engine already has log rotation. it's just mb based instead of days |
# |
May 23rd 2018, 07:45 |
k4t |
yeah, looksl ike this is the only way |
# |
May 23rd 2018, 07:45 |
nitishkumardiwakar |
Ok, but can you provide some hint |
# |
May 23rd 2018, 07:44 |
neon1024 |
@nitishkumardiwakar Sorry, I don’t have the patience to help you today. |
# |
May 23rd 2018, 07:44 |
nitishkumardiwakar |
@neon1024 As you told yesterday, adding belongsTo will effect in inserting data. I am facing this now. How can I solve this? |
# |
May 23rd 2018, 07:42 |
neon1024 |
@k4t You could write your own Logger class for that I would imagine |
# |
May 23rd 2018, 07:39 |
k4t |
is it possible with Cake to rotate its logs after X days? |
# |
May 23rd 2018, 07:39 |
k4t |
hi |
# |
May 23rd 2018, 07:35 |
nitishkumardiwakar |
Somebody please help. I am stucked |
# |
May 23rd 2018, 06:34 |
nitishkumardiwakar |
How can I insert id of table2 while inserting form in table1? |
# |
May 23rd 2018, 06:23 |
nitishkumardiwakar |
Yes it is hiding when adding belongsTo |
# |
May 23rd 2018, 06:21 |
tim |
It makes no sense that the ID would not be in the form data when changing the relations. You need to check the formdata in the browser (in Chrome, use developer tools). If the ID is included there, then you need to check further |
# |
May 23rd 2018, 06:19 |
nitishkumardiwakar |
@tim Is there any solution for it? |
# |
May 23rd 2018, 06:18 |
nitishkumardiwakar |
without belongs to inner join, is not working, and with belongsTo id of table 2 (sizes) is not inserting in table 1 (products) |
# |
May 23rd 2018, 06:17 |
nitishkumardiwakar |
in products table there is (id, name, size_id) and in sizes table there is (id, name) |
# |
May 23rd 2018, 06:15 |
nitishkumardiwakar |
belongsTo |
# |
May 23rd 2018, 06:15 |
tim |
Whats the relation in the ProductsTable? |
# |
May 23rd 2018, 06:12 |
nitishkumardiwakar |
and when I remove belongsTo fields (id of other table) is showing |
# |
May 23rd 2018, 06:12 |
nitishkumardiwakar |
I've checked form data. when there is belongsTo added in model, then fields are not showing in (print_r) |