Log message #4228082

# At Username Text
# Feb 20th 2020, 22:49 challgren @ricksaccous you sound like me! :P
# Feb 20th 2020, 22:49 ricksaccous Croogo can have anything you want ;) if you program it to ;)
# Feb 20th 2020, 22:48 jan-willem Doesn't Croogo have any import?
# Feb 20th 2020, 22:48 dereuromark sounds like this https://github.com/FriendsOfCake/awesome-cakephp#cms-and-applications-built-on-cakephp Croogo a bit. Which basically can do that.
# Feb 20th 2020, 22:47 dereuromark or the blogging part, with some role management :)
# Feb 20th 2020, 22:46 ricksaccous i have no idea though
# Feb 20th 2020, 22:46 ricksaccous it sounds like he might just want to transfer the membership portion over to the new CakePHP portal
# Feb 20th 2020, 22:45 challgren There wouldnt really be a way to convert wordpress to cakephp, you’d have to redesign/code everything from anew
# Feb 20th 2020, 22:45 challgren @info519 wordpress and cakephp are 2 different beasts
# Feb 20th 2020, 22:31 info519 Has anyone ever managed to convert a Wordpress/Buddypress membership based site to CakePHP ? if any experience, please share your ideas
# Feb 20th 2020, 22:01 tomrwaller Flipping heck - been staring at this for hours and wondered why it worked fine in a clean test project - was my form template all along, screwing up the HTML. Now to unpick that hot mess...
# Feb 20th 2020, 21:51 tomrwaller Hi all - any idea why this line would be generating a count of items selected instead of an array of ID's in my add.php? `echo $this->Form->control('associated_technologies._ids', ['options' => $associatedTechnologies]);`
# Feb 20th 2020, 21:45 jan-willem Thank you!
# Feb 20th 2020, 21:43 jan-willem Just noticed. Working. Perfect!
# Feb 20th 2020, 21:40 dereuromark Locally I cannot reproduce for some reason...
# Feb 20th 2020, 21:39 dereuromark Also exists there ;)
# Feb 20th 2020, 21:35 jan-willem But will look to it. thnx
# Feb 20th 2020, 21:35 jan-willem I suppose this one was for me? :P I'm already on CakePHP 4
# Feb 20th 2020, 21:28 wizardfix Reading now @challgren thanks :)
# Feb 20th 2020, 21:27 challgren @wizardfix see https://www.dereuromark.de/2020/02/06/virtual-query-fields-in-cakephp/
# Feb 20th 2020, 21:27 dereuromark @hawk dot syntax is not supported by has afaik. I use here normally https://github.com/dereuromark/cakephp-shim/blob/master/src/Model/Entity/ReadTrait.php - which then supports paths.
# Feb 20th 2020, 21:26 wizardfix From the book (3.8): > Control which Fields Used for Ordering¶ > By default sorting can be done on any non-virtual column a table has. Does this mean the Paginator can no way sort on virtual fields? :thinking_face:
# Feb 20th 2020, 21:18 jan-willem can I use the has() function as well for nested associations? I know I can use it to check if `games->events` exists. But can I use it as well to check if `games->events->competitions` exists?
# Feb 20th 2020, 18:37 phantomwatson Ha! Yeah, that's my experience too. Sometimes just by analyzing your problem enough to write a well-formed question or bug report, the cause reveals itself.
# Feb 20th 2020, 18:34 jh the next attempt works
# Feb 20th 2020, 18:34 jh always when u ask after tinkering for a few hours
# Feb 20th 2020, 18:34 jh i just tinkered around it it works
# Feb 20th 2020, 18:22 phantomwatson I'd like to help, but I'm having a hard time understanding your question.
# Feb 20th 2020, 18:11 jh damn i hate this guessing/magic :E
# Feb 20th 2020, 18:02 jh in patchEntity i use 'TariffsDocuments' => ['onlyIds' => true],
# Feb 20th 2020, 18:01 jh tariffs_documents._ids.0 tariffs_documents._ids.1 etc contents each is just the foreign key to the tariff document
# Feb 20th 2020, 18:01 jh What could probably stop _ids BTM to save the association?
# Feb 20th 2020, 17:57 kaliel :)
# Feb 20th 2020, 17:57 wizardfix @kaliel yes what was I thinking! Of course I have this data from the request! Just had a blind spot lol! It all works now! :)
# Feb 20th 2020, 17:45 slackebot https://github.com/cakephp/cakephp/commit/0cf9921798d823fa87b61bb93f908c57a132a53f#diff-525e59c1441ed03389d3cf0ac1198130R186
# Feb 20th 2020, 17:45 phantomwatson The core uses a colon, the letter C, and a number for placeholders. The colon, I assume is so it's easier to parse the SQL and find those placeholders. The numbers are to differentiate each placeholders from the others. But I don't know why the letter C is used. The commit history for the relevant code suggests that it might be short for "comparison".
# Feb 20th 2020, 17:35 wizardfix @phantomwatson ok, great, `$query->getValueBinder()->bindings()[':c1']['value']` gets me the value in a `debug()` call so now I'll try getting it in the form. But I wonder where this `':c1'` property comes from... :thinking_face:
# Feb 20th 2020, 17:32 kaliel Don't you get these values in requested data ?
# Feb 20th 2020, 17:29 wizardfix Calling `toArray()` just gives me the users without the params. The situation is: 1. User selects "Inactive", "Active" or "All". These map to values 0, 1, 2 respectively. So this value is in the query object and I want to use it to prepopulate the HTML select element in the form when I return the response. `
# Feb 20th 2020, 17:27 phantomwatson It looks like all of those methods are public, so it should work.
# Feb 20th 2020, 17:26 phantomwatson So I'd try `$query->getValueBinder()->bindings()` and see if that works.