Logs for #cakephp

Page 3 of 36,426, showing 100 records out of 3,642,575 total, starting on record 201, ending on 300

# At Username Text
# Yesterday, 09:11 gianmarxgagliardi ok it works but i don't understand this error
# Yesterday, 09:10 slackebot2 <gianmarxgagliardi>
# Yesterday, 09:10 slackebot2 Cake\Console\CommandRunner->run(Array) #15 {main} ```
# Yesterday, 09:10 slackebot2 C:\wamp64\www\ctcake\vendor\cakephp\bake\src\Shell\BakeShell.php(261): Bake\Shell\Task\ModelTask->listUnskipped() #11 C:\wamp64\www\ctcake\vendor\cakephp\cakephp\src\Console\Shell.php(517): Bake\Shell\BakeShell->all() #12
# Yesterday, 09:10 slackebot2 C:\wamp64\www\ctcake\vendor\cakephp\cakephp\src\Console\CommandRunner.php(385): Cake\Console\Shell->runCommand(Array, true) #13 C:\wamp64\www\ctcake\vendor\cakephp\cakephp\src\Console\CommandRunner.php(162): Cake\Console\CommandRunner->runShell(Object(Bake\Shell\BakeShell), Array) #14 C:\wamp64\www\ctcake\bin\cake.php(12):
# Yesterday, 09:10 slackebot2 #0 C:\wamp64\www\ctcake\vendor\cakephp\cakephp\src\Database\Driver.php(93): PDO->__construct('mysql:host=loca...', 'localhost', 'localhost', Array) #1 C:\wamp64\www\ctcake\vendor\cakephp\cakephp\src\Database\Driver\Mysql.php(105): Cake\Database\Driver->_connect('mysql:host=loca...', Array)
# Yesterday, 09:10 slackebot2 #2 C:\wamp64\www\ctcake\vendor\cakephp\cakephp\src\Database\Schema\BaseSchema.php(44): Cake\Database\Driver\Mysql->connect() #3 C:\wamp64\www\ctcake\vendor\cakephp\cakephp\src\Database\Dialect\MysqlDialectTrait.php(62): Cake\Database\Schema\BaseSchema->__construct(Object(Cake\Database\Driver\Mysql))
# Yesterday, 09:10 slackebot2 #4 C:\wamp64\www\ctcake\vendor\cakephp\cakephp\src\Database\Schema\Collection.php(51): Cake\Database\Driver\Mysql->schemaDialect() #5 C:\wamp64\www\ctcake\vendor\cakephp\cakephp\src\Database\Schema\CachedCollection.php(41): Cake\Database\Schema\Collection->__construct(Object(Cake\Database\Connection)) #6
# Yesterday, 09:10 gianmarxgagliardi ```Possible model names based on your database: Exception: SQLSTATE[HY000] [1045] Access denied for user 'localhost'@'localhost' (using password: YES) in [C:\wamp64\www\ctcake\vendor\cakephp\cakephp\src\Database\Driver.php, line 93] 2019-12-11 09:09:31 Error:
# Yesterday, 09:10 slackebot2 C:\wamp64\www\ctcake\vendor\cakephp\bake\src\Shell\Task\ModelTask.php(1050): Bake\Shell\Task\ModelTask->_getAllTables() #9 C:\wamp64\www\ctcake\vendor\cakephp\bake\src\Shell\Task\ModelTask.php(1065): Bake\Shell\Task\ModelTask->listAll() #10
# Yesterday, 09:10 slackebot2 C:\wamp64\www\ctcake\vendor\cakephp\cakephp\src\Database\Connection.php(390): Cake\Database\Schema\CachedCollection->__construct(Object(Cake\Database\Connection), true) #7 C:\wamp64\www\ctcake\vendor\cakephp\bake\src\Shell\Task\ModelTask.php(1096): Cake\Database\Connection->getSchemaCollection() #8
# Yesterday, 09:10 slackebot2 [PDOException] SQLSTATE[HY000] [1045] Access denied for user 'localhost'@'localhost' (using password: YES) in C:\wamp64\www\ctcake\vendor\cakephp\cakephp\src\Database\Driv er.php on line 93 Stack Trace:
# Yesterday, 09:10 chechesa You can try with php bin/cake.php bake all
# Yesterday, 09:07 chechesa I think you are using Windows, have you tried to exec with bin\cake.bat bake all ? (backward slash)
# Yesterday, 09:04 gianmarxgagliardi with a new project with three tables (g.e. : https://stackoverflow.com/questions/59141547/cakephp-displays-the-id-display-table-name-from-two-different-tables-with-relati). how do I cook them all with a command from Shells ? if I go into the new project folder and give the command `bin/cake.bat bake all` returns: _"cake.bat" is not recognized as an internal or external command, an executable program or a batch file._
# Yesterday, 08:47 chechesa Is the same A record. When you create a new subdomain you can assign A record and the new IP of your new server. You can have the same domain pointing across subdomains to other servers
# Yesterday, 08:40 jotpe Morning
# Yesterday, 08:17 md.islam11 @conehead thanks
# Yesterday, 08:16 gianmarxgagliardi morning
# Yesterday, 07:44 dev.cyrusjayson Guys good morning. I have question in DNS set up (not really related to cakephp but I need to put my cakephp project there). My name domain is pointed to another IP with Type value "A Record" , host "@" and value "IP of the server". So the main domain www.sample.com is pointed to another server, now I want to create subdomain that is pointing to different server what will be my type? AAAA? CNAME?
# Yesterday, 06:32 conehead "shows error" is not really helpful. Try `$this->getRequest->getData()` instead
# Yesterday, 06:12 md.islam11 I just written as shortcut
# Yesterday, 06:12 md.islam11 it is
# Yesterday, 06:12 md.islam11 $this->request->getData('name')
# Yesterday, 06:11 md.islam11 thats it.
# Yesterday, 06:11 md.islam11 shows error
# Yesterday, 06:11 md.islam11 that has isset(requet-get('aa'))
# Yesterday, 06:11 md.islam11 all the legacy code
# Yesterday, 06:11 niel45 or is the error just because of the missing $ for $this
# Yesterday, 06:11 md.islam11 I am upgrading my cakephp to 3.8
# Yesterday, 06:10 niel45 although it really depends on what you're trying to do. if you're checking for a value in order to set a sane default I'd use null coallescing: $value = $this->request->getData('a') ?? '';
# Yesterday, 06:08 niel45 $dummy = this->request->getData('a'); isset($dummy);
# Yesterday, 06:03 md.islam11 ?
# Yesterday, 06:03 md.islam11 isset(this->request->getData('a')) shows error . What is the solution.
# Dec 10th, 22:59 ricksaccous well i'm off, enjoy your day
# Dec 10th, 22:59 ricksaccous lol 13337
# Dec 10th, 22:52 challgren Ahh I have it on as bg noise when Im coding
# Dec 10th, 22:49 ricksaccous i'm a harsh critic though
# Dec 10th, 22:49 ricksaccous heh, i stopped watching season 3 i think, it was too cheesy at that point
# Dec 10th, 22:48 challgren @ricksaccous watch Mr Robot all the episodes this season are titled in the 4xx series
# Dec 10th, 22:47 challgren This is my template. Pretty simple form honestly.
# Dec 10th, 22:46 ricksaccous very proper
# Dec 10th, 22:46 ricksaccous oh cool
# Dec 10th, 22:46 challgren 404 is not found
# Dec 10th, 22:46 challgren bad request
# Dec 10th, 22:46 ricksaccous i forget what that status code means but isn't that a page not found
# Dec 10th, 22:46 ricksaccous do you really want to 400 on form error? lol
# Dec 10th, 22:45 challgren @damiano this is an example how to do get/post edits,
# Dec 10th, 22:44 ricksaccous haha, no problem
# Dec 10th, 22:44 ricksaccous but i'm headed off soon so i must simply say good luck
# Dec 10th, 22:44 damiano thanks!
# Dec 10th, 22:44 damiano valueSources works perfectly! wow
# Dec 10th, 22:44 ricksaccous honestly it's a bit hard to imagine your implementation
# Dec 10th, 22:44 ricksaccous ok
# Dec 10th, 22:44 damiano @ricksaccous i am using the GET for this reason, i basically submit the form on the same page
# Dec 10th, 22:43 ricksaccous are you redirecting after submission?
# Dec 10th, 22:43 ricksaccous if there are no errors and the form submitted, why would you still see anything
# Dec 10th, 22:43 damiano @ricksaccous what do you mean?
# Dec 10th, 22:42 damiano i try this
# Dec 10th, 22:42 damiano ```'valueSources' => ['query', 'context']```
# Dec 10th, 22:42 ricksaccous it depends how you are handling the submission
# Dec 10th, 22:42 damiano @ricksaccous yes the form works correctly, but i do not see the values i have inserted after the submit
# Dec 10th, 22:39 dereuromark Docs explain valueSources, jep
# Dec 10th, 22:38 ricksaccous actually @damiano it's explained here https://book.cakephp.org/3/en/views/helpers/form.html#getting-form-values-from-the-query-string
# Dec 10th, 22:37 ricksaccous also why would you want get to populate input fields? why would you rather get than post?
# Dec 10th, 22:32 ricksaccous not sure if that matters but it might
# Dec 10th, 22:32 ricksaccous did you specify the form type?
# Dec 10th, 22:32 damiano only with POST data
# Dec 10th, 22:32 damiano hello, why GET form does not populate the input fields ?
# Dec 10th, 22:15 challgren @kevin.pfeifer in my implementation for a bunch of stats from different tables. I built a view and then manually query it
# Dec 10th, 21:40 kevin.pfeifer ok thx, will try that :+1:
# Dec 10th, 21:40 ricksaccous you'll prob count Books.id
# Dec 10th, 21:39 ricksaccous https://book.cakephp.org/3/en/orm/query-builder.html#aggregates-group-and-having this has a small sample
# Dec 10th, 21:39 kevin.pfeifer thought i could do that with just a contain
# Dec 10th, 21:38 kevin.pfeifer ah, i have to make a left join, forgot that
# Dec 10th, 21:38 ricksaccous https://book.cakephp.org/3/en/orm/query-builder.html
# Dec 10th, 21:38 ricksaccous to get a better idea read docs on QueryBuilder
# Dec 10th, 21:38 ricksaccous $authorsTable->find()->select(['count_of_books' => something_goes_here], other_fields)->leftJoinWith('Books');
# Dec 10th, 21:36 kevin.pfeifer Another Question: I got following DB Structure: 1 Book has many Authors 1 Author has many Books Therfore I have a HABTM between those 2. This basically is set up and works correctly. Now I want to make a query which outputs all the Authors and the amount of books they have written. How should this Query look like in CakePHP 3?
# Dec 10th, 19:47 jotpe @koeller you're Welcome. Cool that you found it :+1:
# Dec 10th, 19:22 koeller @jotpe: I got it. Your input gave me clue. I’m loading a new configuration in a Middleware and that sets App.fullBaseUrl to false again. As the bootstrap code already did run to that point, I’m now storing my fullBaseUrl in a variable. Thank you, again :slightly_smiling_face:
# Dec 10th, 19:11 kevin.pfeifer @admad thx, i will look into that
# Dec 10th, 19:11 admad @kevin.pfeifer view cells
# Dec 10th, 19:10 koeller @jotpe Hmm, I thought when I set it to false, that in bootstrap it would get created automatically
# Dec 10th, 19:10 kevin.pfeifer hello Cake Community, how do I implement something like a "Statistics" Page which would read out and display data from like 20 models?
# Dec 10th, 16:52 jotpe @koeller Did you set *fullBaseUrl* in your config?
# Dec 10th, 16:44 damiano basically i have to load a select based on an option of another selectù
# Dec 10th, 16:44 damiano guy i have to load a select with javascript, how can i avoid problem with Security component?
# Dec 10th, 16:38 koeller Hi everybody, Anyone knows why Router::fullBaseUrl() returns false. I would expect ```Router::url(['controller' => 'posts'], true)``` to return full url, like: www.mypage.com/posts but it only returns, /posts.
# Dec 10th, 16:10 gianmarxgagliardi @neon1024 thanks I owe you an espresso
# Dec 10th, 16:08 neon1024 Dot notation only works in methods which take a string as parameter generally. Such as the `read()` method you pasted above
# Dec 10th, 16:08 gianmarxgagliardi it works
# Dec 10th, 16:08 gianmarxgagliardi `$loggedInUser[nome]`
# Dec 10th, 16:08 neon1024 Your pasted data, looks like an array. So perhaps you meant `$loggedInUser['name']`
# Dec 10th, 16:07 neon1024 This isn’t even valid PHP
# Dec 10th, 16:07 neon1024 Why do you think this is valid? `$loggedInUser.nome`
# Dec 10th, 16:01 gianmarxgagliardi `<?php debug($loggedInUser.nome);?>`: Use of undefined constant nome - assumed 'nome' `<?php debug($loggedInUser->nome);?>`:Trying to get property 'nome' of non-object
# Dec 10th, 15:57 slackebot2 'fixedNowTime' => false }, 'modified' => object(Cake\I18n\FrozenTime) { 'time' => '2019-12-10T14:17:56+00:00', 'timezone' => 'UTC', 'fixedNowTime' => false } ]```
# Dec 10th, 15:57 gianmarxgagliardi from this data structure how do i get the _nome_ field? `<?php $loggedInUser= $this->request->session()->read('Auth.User')?>` `<?php debug($loggedInUser);?>` I print the following data structure: ``` 'id' => (int) 1, 'email' => 'bigben@gmail.com', 'cognome' => 'Siffredi', 'nome' => 'Rocco', 'role' => 'admin', 'created' => object(Cake\I18n\FrozenTime) { 'time' => '2019-12-10T14:17:56+00:00', 'timezone' => 'UTC',
# Dec 10th, 13:33 martin @ndm we here at work al surprised that it was 2.x documentation. but we missed it that it was a special cookbook only for migrations :P