# |
Nov 7th 2019, 22:40 |
martonmiklosqdev |
I can see the problematic line in the variables pane: |
# |
Nov 7th 2019, 22:40 |
martonmiklosqdev |
the view errors a bit better |
# |
Nov 7th 2019, 22:40 |
martonmiklosqdev |
where the problem is in the view |
# |
Nov 7th 2019, 22:40 |
slackebot1 |
<martonmiklosqdev> |
# |
Nov 7th 2019, 22:39 |
martonmiklosqdev |
here is an another example |
# |
Nov 7th 2019, 22:39 |
martonmiklosqdev |
the problematic ItemTypesAttributesController only has 183 lines |
# |
Nov 7th 2019, 22:39 |
martonmiklosqdev |
refers to the Core/Controller.php |
# |
Nov 7th 2019, 22:38 |
martonmiklosqdev |
the line 609 |
# |
Nov 7th 2019, 22:22 |
noel |
@martonmiklosqdev As far as I can see there are line numbers... have you looked at line 609 of your Controller? |
# |
Nov 7th 2019, 22:05 |
martonmiklosqdev |
I will read back the messages tomorrow |
# |
Nov 7th 2019, 22:05 |
martonmiklosqdev |
if anyone has any idea please let me know |
# |
Nov 7th 2019, 21:40 |
martonmiklosqdev |
is it a configuration problem of the apache/PHP or is it a CakePHP config issue? |
# |
Nov 7th 2019, 21:40 |
martonmiklosqdev |
error_reporting = E_ALL |
# |
Nov 7th 2019, 21:39 |
martonmiklosqdev |
in the php.ini I set all error/debug flags |
# |
Nov 7th 2019, 21:38 |
martonmiklosqdev |
I think it is since I upgraded to PHP7 |
# |
Nov 7th 2019, 21:38 |
martonmiklosqdev |
it does not shows the problematic line number |
# |
Nov 7th 2019, 21:38 |
martonmiklosqdev |
https://i.imgur.com/SCJ9sCW.png |
# |
Nov 7th 2019, 21:38 |
martonmiklosqdev |
I have some trouble with the error pages |
# |
Nov 7th 2019, 21:37 |
martonmiklosqdev |
Hello all, |
# |
Nov 7th 2019, 17:36 |
dev.cyrusjayson |
I get error like the gave_fruits does not exist |
# |
Nov 7th 2019, 17:36 |
dev.cyrusjayson |
not yet. I will try this tomorrow. looks much easier. |
# |
Nov 7th 2019, 16:32 |
javier.villanueva |
are you tried $this->Fruits->Users->get($user_id, ['contain' => 'Fruits']) |
# |
Nov 7th 2019, 16:24 |
javier.villanueva |
what error you have? |
# |
Nov 7th 2019, 16:24 |
dev.cyrusjayson |
yes because the gave_fruits has user_id and I want to get only the data for specific user |
# |
Nov 7th 2019, 16:23 |
javier.villanueva |
the function is for passing conditions to contain |
# |
Nov 7th 2019, 16:23 |
dev.cyrusjayson |
the id is the id of gave_fruits. forget the select, could be more |
# |
Nov 7th 2019, 16:22 |
javier.villanueva |
anyway you can add conditions to contain without function |
# |
Nov 7th 2019, 16:20 |
javier.villanueva |
your gavefruits table has "id" field? |
# |
Nov 7th 2019, 16:15 |
slackebot1 |
}]);``` What would be wrong? |
# |
Nov 7th 2019, 16:15 |
dev.cyrusjayson |
This is working ``` $fruits = $this->Fruits->find('all') ->contain(['GaveFruits']); ``` This is not working ``` $fruits = $this->Fruits->find('all') ->contain(['GaveFruits', function (Query $q){ return $q ->select(['id']) ->where(['user_id' => 1]); |
# |
Nov 7th 2019, 15:59 |
slackebot1 |
DevicesController::crud.bulk/delete() could not be found, or is not accessible.` |
# |
Nov 7th 2019, 15:59 |
slackebot1 |
'Crud.ApiQueryLog', 'Crud.Search', ], ], ]; ``` And my route like this: ``` $routes->resources('Devices', # @todo: this is only for demo purposes, deleting all devices is not desirable [ 'map' => [ 'deleteAll' => [ // this is the route in the URL 'action' => 'Crud.Bulk/Delete', // this is the action it matches 'method' => 'DELETE', ], ], ]); ``` The error is: `Action |
# |
Nov 7th 2019, 15:59 |
noel |
Hi guys. I'm working with `friendsofcake/crud`. I want to map bulk delete but can't figure out how. I have my AppController components defined like this: ``` public $components = [ 'RequestHandler', 'Crud.Crud' => [ 'actions' => [ 'Crud.Index', 'Crud.View', 'Crud.Add', 'Crud.Edit', 'Crud.Delete', ], 'listeners' => [ 'CrudJsonApi.JsonApi', 'CrudJsonApi.Pagination', // Pagination != ApiPagination |
# |
Nov 7th 2019, 15:49 |
dev.cyrusjayson |
okay I will look closely |
# |
Nov 7th 2019, 15:49 |
javier.villanueva |
I advice you that if you dont need a model for gavefruits, dont use a model. Define the relations in UsersModel and FruitsModel |
# |
Nov 7th 2019, 15:47 |
javier.villanueva |
but you need define better in your model |
# |
Nov 7th 2019, 15:47 |
javier.villanueva |
you dont need this complex find |
# |
Nov 7th 2019, 15:46 |
javier.villanueva |
https://book.cakephp.org/3/en/orm/associations.html#belongstomany-associations |
# |
Nov 7th 2019, 15:46 |
javier.villanueva |
you should read the doc |
# |
Nov 7th 2019, 15:44 |
slackebot1 |
}]); ``` |
# |
Nov 7th 2019, 15:44 |
dev.cyrusjayson |
not working. what is wrong here ``` Model $this->belongsToMany('GaveFruits', [ 'foreignKey' => 'fruit_id' ]); ---------- in Controller $fruits = $this->Fruits->find('all') ->contain(['GaveFruits'=>function(Query $q){ return $q ->where(['GaveFruits.user_id' => 1]); |