Log message #4221890

# At Username Text
# Jan 9th 2020, 14:02 alexdd55976 @dereuromark good point thanks. i will forward him the message.. i am not in the office
# Jan 9th 2020, 14:01 dereuromark The $id is better (int) casted, otherwise you might open yourself to sql injections^^
# Jan 9th 2020, 14:01 sdevore check out https://book.cakephp.org/3/en/orm/query-builder.html#subqueries
# Jan 9th 2020, 14:00 alexdd55976 the subselect is the big issue
# Jan 9th 2020, 13:59 alexdd55976 bu i am sure there is a more cakey way to do that
# Jan 9th 2020, 13:59 ndm ouch
# Jan 9th 2020, 13:59 alexdd55976 a colleague did that ```$this->Departments->find() ->where([ 'departments.active' => 1, 'departments.id NOT IN (SELECT DISTINCT department_id FROM users_departments where user_id <> ' . $id . ' )', ]);```
# Jan 9th 2020, 13:58 slackebot `Departments__modified` FROM departments Departments WHERE ( departments.active = '1' AND departments.id NOT IN ( SELECT DISTINCT department_id FROM users_departments where user_id <> 1 ) )```
# Jan 9th 2020, 13:58 alexdd55976 can somebody help me bringing the following statement to orm query? ```SELECT Departments.id AS `Departments__id`, Departments.name AS `Departments__name`, Departments.user_id AS `Departments__user_id`, Departments.is_root AS `Departments__is_root`, Departments.parent_id AS `Departments__parent_id`, Departments.active AS `Departments__active`, Departments.created AS `Departments__created`, Departments.modified AS
# Jan 9th 2020, 13:58 ndm I heard everybody loves Upwork ;)
# Jan 9th 2020, 13:49 spriz Do you guys know anywhere awesome to post a Cake job? :)
# Jan 9th 2020, 12:03 tibor.hajos Great, thank you. I'll see how long it takes for me to get stuck :P
# Jan 9th 2020, 12:01 dereuromark Jep, and you can use cake4 branch of sandbox to real life test it. Helped me a lot.
# Jan 9th 2020, 12:00 tibor.hajos Cool, I made a note of it. I'll probably need some help in figuring out how to upgrade everything, as Cake is still new for me. Is it best to just pull everything, see what's broken and fix it?
# Jan 9th 2020, 11:56 dereuromark Tools, Setup, Tags, Ratings, Geo probably, in that order. rest doesnt seem to be needed for a while^^
# Jan 9th 2020, 11:53 tibor.hajos Sure, I can get some hours in this weekend. Which issue has the best necessity/difficulty ratio?
# Jan 9th 2020, 11:39 dereuromark Anyone interested in helping to get the plugins Cache, Tags, Ratings, Geo, Translate, Captcha, Tools, Setup etc ready for Cake4? A little help is needed, I did already most of the hard part here :) Having already upgraded 10+ others, I appreciate the assistance.
# Jan 9th 2020, 10:33 jotpe Handle doesn't get passed to the Paginator and the route is obviously not found.
# Jan 9th 2020, 10:31 slackebot <jotpe>
# Jan 9th 2020, 10:31 jotpe I use BootstrapUI and have a route with 2 variables, but one doesn't get passed:
# Jan 9th 2020, 10:30 jotpe Anyone knows how to pass a variable to a the PaginatorHelper?
# Jan 9th 2020, 10:30 jotpe THis defines that the `AdministrationUser` Model uses the table `users.` In your db should be a table users then.
# Jan 9th 2020, 10:28 y.skrzypczyk There is a databases so no ?
# Jan 9th 2020, 10:27 y.skrzypczyk In the plugin I have : <?php /** * UserAdmin Model * * @property Group $Group */ App::uses('AdministrationAppModel', 'Administration.Model'); class AdministrationUser extends AdministrationAppModel { public $useTable = 'users'; /// Utilise la table users
# Jan 9th 2020, 10:27 jotpe Well I guess you have to dig a bit then. Maybe the app doesn't even has db access?! Have a look at the links above and figure out how this app works.
# Jan 9th 2020, 10:22 y.skrzypczyk I was told that the software worked before ... there are no defaults but there are some other variable
# Jan 9th 2020, 10:21 jotpe No credentials, no db access :man-shrugging:
# Jan 9th 2020, 10:21 jotpe So then your db access is not configured :)
# Jan 9th 2020, 10:21 y.skrzypczyk There is no default
# Jan 9th 2020, 10:21 jotpe Also have a look in app/Config/routes.php to see if there're custom routes, otherwise the routing is as follows: https://book.cakephp.org/2/en/development/routing.html#default-routing
# Jan 9th 2020, 10:20 y.skrzypczyk Error: The datasource configuration default was not found in database.php.
# Jan 9th 2020, 10:20 y.skrzypczyk This is one of the multiples problems :
# Jan 9th 2020, 10:19 jotpe So then have a look at app/Config/database.php and search for ```public $default = array(``` there you'll find the db configuration like described here: https://book.cakephp.org/2/en/development/configuration.html#database-configuration
# Jan 9th 2020, 10:15 y.skrzypczyk 2.4.0
# Jan 9th 2020, 10:15 y.skrzypczyk Yes I think so
# Jan 9th 2020, 10:15 jotpe This one should be used by the framework
# Jan 9th 2020, 10:15 jotpe Have a look at Cake folder
# Jan 9th 2020, 10:15 y.skrzypczyk I can't do it ... but I would like
# Jan 9th 2020, 10:14 jotpe Thought about trashing it and rebuild? ;)
# Jan 9th 2020, 10:13 y.skrzypczyk Yes I know
# Jan 9th 2020, 10:12 y.skrzypczyk There are 4 directories : Cake, Cake2.2, Cake2.3, Cake2.7.1