Log message #4212367

# At Username Text
# Nov 5th 2019, 23:53 dereuromark u never know
# Nov 5th 2019, 23:53 daniel.upshaw Yah, I mean it's such a basic thing I'm sure it won't be present in a fresh app install
# Nov 5th 2019, 23:51 dereuromark verified in minutes, and then hopefully it becomes a bit easier to track down the rest
# Nov 5th 2019, 23:51 dereuromark still good to exclude such things as core bugs
# Nov 5th 2019, 23:50 daniel.upshaw This is really bare bones though.. I'm trying to work with a basic `require cakephp/cakephp`
# Nov 5th 2019, 23:50 daniel.upshaw That'll be the way to go
# Nov 5th 2019, 23:50 daniel.upshaw Oddly, it's only some of the templates, specifically Error templates
# Nov 5th 2019, 23:50 dereuromark see if you can replicate with fresh 4.x app
# Nov 5th 2019, 23:49 daniel.upshaw I wouldn't put it past a config issue... but I did normalize things to Cake4 as closely as I could
# Nov 5th 2019, 23:45 dereuromark sounds like a config issue, or a bug
# Nov 5th 2019, 23:42 daniel.upshaw Any ideas offhand why Cake4 branch would look for any templates in `src/templates`?
# Nov 5th 2019, 23:19 slackebot1 variable does have the contain ``` $query = $this->Table->find( 'all' ) ->contain( ['Table2'] ); ``` The contain also works if i remove my function from above (to show related information in my index page) but i dont know how i can perform a custom where in which both my tables are being searched with concatinated fields
# Nov 5th 2019, 23:19 slackebot1 ->like( $conc2, "%$search%" ) ->like( $conc3, "%$search%" ) ->like( $conc4, "%$search%" ); } ); } ``` But all I get is a ``` Column not found: 1054 Unknown column 'Table2.first_name' in 'where clause' ``` due to the fact, that the Query doesn't join. This functions resides in my index() function of my Table1Controller and the initialization of the $query
# Nov 5th 2019, 23:19 slackebot1 'Table2.last_name' => 'literal' ] ); $conc4 = $q->func() ->concat( [ 'Table2.last_name' => 'literal', ' ', 'Table2.first_name' => 'literal' ] ); return $exp->or( [ 'Table1.company LIKE'
# Nov 5th 2019, 23:19 slackebot1 => "%$search%", 'Table1.first_name LIKE' => "%$search%", 'Table1.last_name LIKE' => "%$search%", 'Table1.city LIKE' => "%$search%", 'Table2.first_name LIKE' => "%$search%", 'Table2.last_name LIKE' => "%$search%" ] ) ->like( $conc1, "%$search%" )
# Nov 5th 2019, 23:19 slackebot1 'Table1.last_name' => 'literal', ' ', 'Table1.first_name' => 'literal' ] ); // Concatenated EasybillCustomersContacts Name $conc3 = $q->func() ->concat( [ 'Table2.first_name' => 'literal', ' ',
# Nov 5th 2019, 23:19 slackebot1 */ // Concatenated EasybillCustomers Name $conc1 = $q->func() ->concat( [ 'Table1.first_name' => 'literal', ' ', 'Table1.last_name' => 'literal' ] ); $conc2 = $q->func() ->concat( [
# Nov 5th 2019, 23:19 kevin.pfeifer i try to do something like that ``` // Change query if a search parameter is given in GET data if ( $search ) { // Search for concat fields in cakephp >=3 // https://stackoverflow.com/questions/35405261/search-with-concat-fields-in-cakephp-3 $query->where( function( $exp, $q ) use ( $search ) { /** * @var QueryExpression $exp * @var Query $q
# Nov 5th 2019, 21:56 phantomwatson Ah, nevermind for my question. `Table::getDependent()` was right in front of me the whole time.
# Nov 5th 2019, 21:50 phantomwatson I might be misunderstanding what you're trying to do.
# Nov 5th 2019, 21:49 phantomwatson @kevin.pfeifer, does it work to specify a join and include the table name in the field name, e.g. `concat(['title' => 'Articles.title', 'author' => 'Authors.name'])`?
# Nov 5th 2019, 21:47 phantomwatson Does anyone happen to know how to query a table or entity and determine which associations are marked as dependent?
# Nov 5th 2019, 21:35 kevin.pfeifer i found that, but this only works for the same table https://stackoverflow.com/questions/35405261/search-with-concat-fields-in-cakephp-3
# Nov 5th 2019, 21:34 kevin.pfeifer someones know how I can use connected tables inside a custom QueryExpression for a concatenated where search?
# Nov 5th 2019, 21:23 daniel.upshaw Just getting used to the new folder structure... still confusing why it was searching in `src/` if the folder is moved
# Nov 5th 2019, 21:21 daniel.upshaw Yeah oddly it wanted to find that template in `src/templates`
# Nov 5th 2019, 21:17 daniel.upshaw Doesn't seem to be `paths.php`
# Nov 5th 2019, 21:14 daniel.upshaw That's probably it lol
# Nov 5th 2019, 21:14 daniel.upshaw I'll make sure my config files are up-to-date with 4
# Nov 5th 2019, 21:12 daniel.upshaw Where core and pages are basic plugins
# Nov 5th 2019, 21:12 daniel.upshaw ```Error: [Cake\View\Exception\MissingTemplateException] Template file 'Error/error500.php' could not be found. The following paths were searched: - core/src/templates/plugin/Pages/ - pages/templates/ - core/src/templates/ - vendor/cakephp/cakephp/templates/ ```
# Nov 5th 2019, 21:11 daniel.upshaw I noticed sometimes it searches for templates in `src/templates`, and sometimes `templates`
# Nov 5th 2019, 21:11 daniel.upshaw Jumping onto Cake4 :slightly_smiling_face:
# Nov 5th 2019, 17:35 karmicdice Adios! Thanks for being patient... just learning my way to contrib more to the framework in near future. :slightly_smiling_face: Learning...
# Nov 5th 2019, 17:33 karmicdice Haha! It is close to mid-night here, just wanted to be quick.
# Nov 5th 2019, 17:33 dereuromark Didnt want to Force push?^^
# Nov 5th 2019, 17:32 karmicdice https://github.com/cakephp/cakephp/pull/13843
# Nov 5th 2019, 17:31 karmicdice @dereuromark Yep. Took a backup and made a new PR. Discarded the previous branch.
# Nov 5th 2019, 17:30 karmicdice Yes Windows. I have PhpStorm on Windows... but setting up stuff was taking up time.
# Nov 5th 2019, 17:11 dereuromark I used to do this via Windows Tortoise Git with single clicks too back many years ago, since Linux I only use CLI these days, I might also have to check the PHPStorm GUI here (again) some day.
# Nov 5th 2019, 17:11 dereuromark @karmicdice Make sure you got a backup branch stored away just in case, then even if things go boom, you can recover and restart without having lost all the changes, once you (accidently or on purpose) then force push to upstream.