# |
Jun 11th 2018, 18:18 |
itmpls |
and cleared orm cache etc |
# |
Jun 11th 2018, 18:18 |
itmpls |
is there a way to debug the behavior? pretty sure I set it up right |
# |
Jun 11th 2018, 18:10 |
itmpls |
err - yeah I have the behavior on the right model. gonna see if I missed anything else :slightly_smiling_face: |
# |
Jun 11th 2018, 18:10 |
jeremyharris |
if it doesn’t contain Comments, there’s nothing to update |
# |
Jun 11th 2018, 18:10 |
jeremyharris |
if you update an Article that contains Comment entities, the behavior would fire when the Comments are changed |
# |
Jun 11th 2018, 18:09 |
jeremyharris |
I think it’s the other way around, the behavior is on the CommentsTable so when comments are changed, it updates the appropriate Article.comments_count |
# |
Jun 11th 2018, 17:58 |
itmpls |
it's not "aware" if you update a comment? |
# |
Jun 11th 2018, 17:58 |
itmpls |
for the countercache example in cake's docs with countercache on comments referencing Articles.comments_count, this would only work if/when you updated an Article entity? |
# |
Jun 11th 2018, 17:50 |
developer |
so, thank you for your help, I keep trying to fix that |
# |
Jun 11th 2018, 17:35 |
developer |
ok |
# |
Jun 11th 2018, 17:34 |
developer |
3,6,5 |
# |
Jun 11th 2018, 17:34 |
developer |
because the plugin works perfectly on cake version 3.6.4 but not on 3.6.4 |
# |
Jun 11th 2018, 17:34 |
admad |
it only mentioned `Plugin::routes()` |
# |
Jun 11th 2018, 17:34 |
admad |
don't read into things which error message does not actually say :slightly_smiling_face: |
# |
Jun 11th 2018, 17:33 |
developer |
I thought that* |
# |
Jun 11th 2018, 17:32 |
developer |
I mean the Router::plugin() it's deprecated and I thought I have to change it |
# |
Jun 11th 2018, 17:31 |
admad |
so? |
# |
Jun 11th 2018, 17:31 |
developer |
yeah |
# |
Jun 11th 2018, 17:31 |
admad |
then the error should be gone |
# |
Jun 11th 2018, 17:31 |
developer |
yes |
# |
Jun 11th 2018, 17:31 |
admad |
did you remove the `Plugin::routes()` call from config/routes.php ? |
# |
Jun 11th 2018, 17:31 |
developer |
what should I do to fix that? |
# |
Jun 11th 2018, 17:30 |
developer |
File uploaded https://cakesf.slack.com/files/UB6BN898W/FB6GHEN2K/-.php / https://slack-files.com/T053DPNCM-FB6GHEN2K-d0935410bf - and for example I have a plugin with that code : |
# |
Jun 11th 2018, 17:28 |
admad |
yes you do |
# |
Jun 11th 2018, 17:27 |
developer |
I followed the error link on my app "https://book.cakephp.org/3.0/en/development/application.html#adding-the-new-http-stack-to-an-existing-application" but I'am not sure if I have to remove Plugin::routes(); from routes.php |
# |
Jun 11th 2018, 17:26 |
developer |
it's said the same error |
# |
Jun 11th 2018, 17:26 |
developer |
but I already install a clean cake and still the problem |
# |
Jun 11th 2018, 17:24 |
admad |
the error message is quite clear about what needs to be done. |
# |
Jun 11th 2018, 17:23 |
developer |
and some plugins doesn't work anymore |
# |
Jun 11th 2018, 17:23 |
developer |
hehe I updated today and now I am getting "Deprecated (16384): You no longer need to call `Plugin::routes()` after upgrading to use Http\Server." |
# |
Jun 11th 2018, 17:22 |
admad |
most likely, if you state your problem |
# |
Jun 11th 2018, 17:21 |
developer |
I have a problem with the last cakephp update, someone could help me? |
# |
Jun 11th 2018, 17:20 |
developer |
Hi there! |
# |
Jun 11th 2018, 17:20 |
admad |
np |
# |
Jun 11th 2018, 17:18 |
sibusiso_slack |
Ahhh thanks. I was using `$this->request()->` instead of `$this->request->` . Thanks @lorenzo, @sdevore and @admad - I was too eager and didn't pay attention. |
# |
Jun 11th 2018, 17:16 |
admad |
can't use a method which doesn't yet exist in the version you are using :slightly_smiling_face: |
# |
Jun 11th 2018, 17:15 |
admad |
use $this->request in 3.6 |
# |
Jun 11th 2018, 17:15 |
sibusiso_slack |
@admad What can I use in 3.6? I want to hide menu items based on session variables, but I get `Call to undefinded method` whether I use `getRequest()` or the deprecated `$this->request` |
# |
Jun 11th 2018, 16:56 |
admad |
in templates too that is |
# |
Jun 11th 2018, 16:55 |
admad |
you will have `$this->getRequest()` in 3.7 :slightly_smiling_face: |
# |
Jun 11th 2018, 16:55 |
sdevore |
@sibusiso_slack I think in Views you still have to do $this->request->getSession() |