# |
Dec 10th 2019, 09:19 |
jotpe |
So what's in line 35? |
# |
Dec 10th 2019, 09:19 |
gianmarxgagliardi |
I made a copy and paste of the Application.php file |
# |
Dec 10th 2019, 09:18 |
gianmarxgagliardi |
@jotpe give me this *`( ! ) Parse error: syntax error, unexpected 'class' (T_CLASS), expecting '{' in C:\wamp64\www\testlogin\src\Application.php on line _35_`* |
# |
Dec 10th 2019, 09:14 |
jotpe |
https://book.cakephp.org/3/en/development/application.html |
# |
Dec 10th 2019, 09:14 |
jotpe |
src/Application.php |
# |
Dec 10th 2019, 09:13 |
gianmarxgagliardi |
@jotpe |
# |
Dec 10th 2019, 09:11 |
gianmarxgagliardi |
nameCmsCake>vendor>composer>composer>src>ComposerConsole>Application.php ? |
# |
Dec 10th 2019, 09:09 |
gianmarxgagliardi |
Application.php where I find it ? |
# |
Dec 10th 2019, 09:08 |
gianmarxgagliardi |
where I find that file in the cake structure |
# |
Dec 10th 2019, 09:08 |
gianmarxgagliardi |
I didn't understand how I implement it |
# |
Dec 10th 2019, 09:04 |
jotpe |
@gianmarxgagliardi `$this->Auth->identify();` uses the AuthComponent `$this->Authentication->getResult();` the Middleware of the Authentication Plugin. You need to implement the AuthenticationService in your `Application.php` as in this commit https://github.com/julianpollmann/cakephp-auth/commit/9dbc3ac7d83c7be078e1579d1e9b9f94cf313717 |
# |
Dec 10th 2019, 09:01 |
jotpe |
Morning! |
# |
Dec 10th 2019, 08:38 |
slackebot2 |
`getResult()` on boolean_ |
# |
Dec 10th 2019, 08:38 |
slackebot2 |
login function of your project ``` public function login() { $result = $this->Authentication->getResult(); // If the user is logged in send them away. if ($result->isValid()) { $this->Flash->success(__('You are logged in.')); $target = $this->Authentication->getLoginRedirect() ?? '/users'; return $this->redirect($target); } }``` error: _Call to a member function |
# |
Dec 10th 2019, 08:38 |
gianmarxgagliardi |
the login function of the tutorial 3.8.5 ``` public function login() { if ($this->request->is('post')) { $user = $this->Auth->identify(); if ($user->isValid()){ $this->Auth->setUser($user); return $this->redirect($this->Auth->redirectUrl()); } $this->Flash->error('Your username or password is incorrect.'); } }``` the |
# |
Dec 10th 2019, 08:35 |
gianmarxgagliardi |
@jotpe I saw the project that you shared with what I did from me, there are no big differences are the same. One of the differences is in the login function in the UsersController. Only the login function of the project gives me an error |
# |
Dec 10th 2019, 08:12 |
gianmarxgagliardi |
morning |
# |
Dec 10th 2019, 08:11 |
javier.villanueva |
morning all |
# |
Dec 10th 2019, 01:05 |
kgb.acct.personal |
Uhm. Thanks |
# |
Dec 10th 2019, 01:03 |
slackebot2 |
!tias |
# |
Dec 10th 2019, 01:03 |
slackebot2 |
Command sent from Slack by challgren: |
# |
Dec 10th 2019, 01:01 |
slackebot2 |
!tsia |
# |
Dec 10th 2019, 01:01 |
slackebot2 |
Command sent from Slack by kgb.acct.personal: |
# |
Dec 10th 2019, 00:17 |
dereuromark |
remove that command, you dont need that line |
# |
Dec 10th 2019, 00:14 |
luizcmarin |
yes. composer does not install without errors on php74 ... |
# |
Dec 9th 2019, 23:17 |
luizcmarin |
error only php74..? php73 is ok |
# |
Dec 9th 2019, 22:11 |
luizcmarin |
My attempts to start a new project are not working. (windows 10) $ composer create-project --prefer-dist cakephp / app hello |
# |
Dec 9th 2019, 21:50 |
rochasmarcelo |
@luizcmarinyou can always update the doc when you found some issue and a send a pull request . On the right side of the page there is an edit button, please check https://book.cakephp.org/3/en/contributing/documentation.html to understand the documentation files |
# |
Dec 9th 2019, 21:36 |
slackebot2 |
But in Portuguese it says: "ApplesController (...‘ ApplesController.php ') is accessed by http://example.com/apples. " Now the example used is 'users' in English, which agrees with the general context. Already in Portuguese we have 'people', 'users' and 'apples'! In addition, the documentation in Portuguese is not following the documentation in English. Compare the following topic "View Conventions" in English and Portuguese. You can see that ther |
# |
Dec 9th 2019, 21:36 |
slackebot2 |
are more things. So I ask, so that my collaboration is not in vain and ends up in a maze that no one else understands anything: how to proceed? I've worked with documentation and text editing, and it was not easy for me to understand cakephp with the documentation that now said one thing then exemplified another .... [13h15] hummmm .... until the message above didn't get that big ... I thought it would get worse ...:,) |
# |
Dec 9th 2019, 21:36 |
slackebot2 |
"PeopleController and LatestArticlesController" and "/ articles / view maps to ArticlesController view () method", which is different: 'People' and 'Users', for Brazilian programmers refer to different things. See another example on the same link, now under the topic "URL Considerations for Controller Names". The first sentence ends with "file name UsersController.php) is accessed from http://example.com/users." in the 3.x and 4.x documentation. |
# |
Dec 9th 2019, 21:36 |
luizcmarin |
Hi. I'm working on the portuguese translation. But the current Portuguese translation is somewhat confusing. It is different from the original in English. For example, https://book.cakephp.org/3/en/intro/conventions.html uses "UsersController and ArticleCategoriesController" and "/ users / view maps to view () method of the UsersController" in controller conventions. In documentation 4.x follows the same. Already in Portuguese appears |
# |
Dec 9th 2019, 21:36 |
luizcmarin |
I would like to get a broader feedback from the other project participants on the subject below because the Portuguese translation is so outdated. It's very discouraging ... a pity after so much effort from those who have devoted themselves to this work. " |
# |
Dec 9th 2019, 20:21 |
slackebot2 |
idea .... |
# |
Dec 9th 2019, 20:21 |
luizcmarin |
@ndm "Yeah, maybe you're taking it a tiny step to do it @luizcmarin, CakePHP licenses don't cost 1000+ dollars, so CakeSF could afford employing a dedicated documentation team. Surely there's quite some room for improvement, but you got to keep your expectations real " You're right. If I had 1000 dollars I would do all the documentation since I have some free time due to the severe fibromyalgia that attacks me. And until you gave a good |
# |
Dec 9th 2019, 19:46 |
japerlman |
I tried using \" to force the quotes in but that just creates a different error |
# |
Dec 9th 2019, 19:45 |
japerlman |
It's building the query as SELECT (SUM(ClientLogs.hours)) instead of SELECT (SUM("ClientLogs"."hours")) |
# |
Dec 9th 2019, 19:19 |
japerlman |
]: Undefined table: 7 ERROR: missing FROM-clause entry for table "clientlogs" LINE 1: SELECT (SUM(ClientLogs.hours)) AS "hours", "ClientLogs"."cli... ^ |
# |
Dec 9th 2019, 19:19 |
japerlman |
Works, but if I switch the comment for the send line, trying to SUM that same field |
# |
Dec 9th 2019, 19:19 |
japerlman |
``` $logReport ->select([ //'hours' => $logReport->func()->sum('ClientLogs.hours'), 'ClientLogs.hours', 'ClientLogs.client_id'``` |
# |
Dec 9th 2019, 19:19 |
japerlman |
Sorry, wasn't done formatting. |