Logs for #cakephp

Page 7 of 36,430, showing 100 records out of 3,642,926 total, starting on record 601, ending on 700

# At Username Text
# 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
# Dec 10th, 13:26 javier.villanueva https://book.cakephp.org/3/en/development/testing.html
# Dec 10th, 13:26 javier.villanueva do you know IntegrationTestTrait ?
# Dec 10th, 13:22 damiano i cannot write/read sessions
# Dec 10th, 13:22 damiano when i test my website with bin/cake server do the sessions work correctly?
# Dec 10th, 13:16 yadav.manu36 No, it is not stored in session, it is like $_GET. you can say getQuery() provide clean data
# Dec 10th, 13:15 martin @ndm oh ok haha :P
# Dec 10th, 13:13 damiano to avoid showing parameters
# Dec 10th, 13:13 damiano maybe store the getQuery() in session ?=
# Dec 10th, 13:13 damiano @yadav.manu36 can i create more "user/seo friendly querystring parameters?
# Dec 10th, 13:11 damiano thanks!
# Dec 10th, 13:11 damiano @yadav.manu36
# Dec 10th, 12:58 ndm @martin It's the Migrations plugin Cookbook, not the CakePHP Cookbook, ie it's the Migrations plugin version 2.x docs
# Dec 10th, 12:49 kiwi_46 hello
# Dec 10th, 12:48 neon1024 Maybe open a ticket on cakephp/docs
# Dec 10th, 12:47 neon1024 Even 1.0.0 depends on 3.x
# Dec 10th, 12:47 neon1024 https://packagist.org/packages/cakephp/migrations#1.0.0
# Dec 10th, 12:47 neon1024 No, you’re right there @martin
# Dec 10th, 12:44 neon1024 That was pre-Phinx though I think :thinking_face:
# Dec 10th, 12:44 neon1024 Migrations worked with 2.x
# Dec 10th, 12:41 martin https://book.cakephp.org/migrations/2/en/index.html# << why is this in the 2.x cookbook? this is 3.x right?
# Dec 10th, 12:37 yadav.manu36 @damiano use query string with view detail URL <?= $this->Html->link("View Detail", ['action' => 'view', $user->id, '?' => $this->request->getQuery()], ['alt' => __('View user'), 'title' => __('View user')]) ?> and when you want to go back then use below url <?= $this->Html->link("Back", ['action' => 'index', '?' => $this->request->getQuery()], ['alt' => __('Go Back'), 'title' => __('Go Back')]) ?>
# Dec 10th, 12:32 damiano to go back without using the browser i mean
# Dec 10th, 12:32 damiano guys what is the best way to "remember" the page (pagination) when i go to the detail of a product of the list i have paginated?
# Dec 10th, 12:22 ashish_onmobile I am not able to instal intl extension
# Dec 10th, 12:22 ashish_onmobile did anyone try latest xampp vm update
# Dec 10th, 12:01 yadav.manu36 can anyone help me?
# Dec 10th, 11:56 gianmarxgagliardi @neon1024 wrooooooooooooooo
# Dec 10th, 11:55 gianmarxgagliardi @jotpe @steinkel thanks I hope I haven't forgotten anyone
# Dec 10th, 11:55 gianmarxgagliardi solved big boys
# Dec 10th, 11:53 gianmarxgagliardi it was a problem of fields
# Dec 10th, 11:52 gianmarxgagliardi ok it works
# Dec 10th, 11:50 steinkel your `$fields` are matching the form field names?
# Dec 10th, 11:49 steinkel well, it says the credentials are not found
# Dec 10th, 11:48 gianmarxgagliardi @steinkel yes, but it says that they are not valid even if they are
# Dec 10th, 11:48 yadav.manu36 I want to use only vendor plugin templates in root plugin structure but it is not working. can anyone help me?
# Dec 10th, 11:46 slackebot2 <gianmarxgagliardi>
# Dec 10th, 11:45 steinkel are you using valid credentials and submitting the form?
# Dec 10th, 11:45 gianmarxgagliardi yes
# Dec 10th, 11:45 steinkel you should see the login form right?
# Dec 10th, 11:45 steinkel go to /users/login page
# Dec 10th, 11:44 gianmarxgagliardi @steinkel I didn't understand what I should do
# Dec 10th, 11:41 steinkel @gianmarxgagliardi try posting the credentials to the users/login form
# Dec 10th, 11:40 neon1024 I feel like if @gianmarxgagliardi application starts working we’ll open a portal to Final Space and unleash the Titans upon our Universe
# Dec 10th, 11:35 gianmarxgagliardi in _Application.php_ I changed as follows: ```$service->loadAuthenticator('Authentication.Form', [ 'fields' => $fields, 'loginUrl' => \Cake\Routing\Router::url([ 'plugin' => null, 'prefix' => null, 'controller' => 'Users', 'action' => 'login' ]) ]);``` *does not login* yet but the error has changed:
# Dec 10th, 11:35 slackebot2 _\src\Controller\UsersController.php (line 136)_ ```object(Authentication\Authenticator\Result) { [protected] _status => 'FAILURE_CREDENTIALS_MISSING' [protected] _data => null [protected] _errors => [ (int) 0 => 'Login credentials not found' ] }```
# Dec 10th, 11:28 damiano got it
# Dec 10th, 11:28 damiano ok
# Dec 10th, 11:28 damiano then i need to check if the url startswith.. my path
# Dec 10th, 11:28 damiano @dereuromark $this->request->getPath()