Log message #4181499

# At Username Text
# Mar 29th 2019, 14:13 joopm just dont understand that it was working in AppController without the getController
# Mar 29th 2019, 14:13 admad you will with time :slightly_smiling_face:
# Mar 29th 2019, 14:12 joopm i wish i could have deeper knowledge
# Mar 29th 2019, 14:12 joopm thank you admad your help
# Mar 29th 2019, 14:09 admad access it using `$this->getController()->viewBuilder()`
# Mar 29th 2019, 14:08 admad just adding a "use" statement does not magically provided you an instance of that class
# Mar 29th 2019, 14:05 joopm i appended use Cake\View\ViewBuilder; but does not solve the issue
# Mar 29th 2019, 14:04 joopm is anyone know why i get undefinied method error to viewBuilder in my component?
# Mar 29th 2019, 14:03 liaogz82 ok thanks
# Mar 29th 2019, 14:02 admad @liaogz82 @markstory might be able to help you
# Mar 29th 2019, 14:01 liaogz82 or someone to double check it
# Mar 29th 2019, 14:00 grossolive4 hello
# Mar 29th 2019, 13:57 liaogz82 who do I ask?
# Mar 29th 2019, 13:57 liaogz82 i need resources to prep my slides
# Mar 29th 2019, 13:57 liaogz82 theme framework wars
# Mar 29th 2019, 13:57 liaogz82 https://2019.phpconf.asia/
# Mar 29th 2019, 13:57 liaogz82 i am tasked to present about cakephp in the next phpconfasia
# Mar 29th 2019, 13:56 liaogz82 hi another request
# Mar 29th 2019, 13:50 liaogz82 its default there
# Mar 29th 2019, 13:48 ricksaccous ohhh ok
# Mar 29th 2019, 13:48 liaogz82 i have to comment his out
# Mar 29th 2019, 13:48 liaogz82 my routes.php has this `$routes->applyMiddleware('csrf');`
# Mar 29th 2019, 13:46 ricksaccous unless you are using your own csrf solution
# Mar 29th 2019, 13:46 ricksaccous and if you aren't loading it then your api request is not a csrf problem
# Mar 29th 2019, 13:45 ricksaccous $this->loadComponent('Csrf');
# Mar 29th 2019, 13:45 ricksaccous it should be this one
# Mar 29th 2019, 13:45 ricksaccous wait
# Mar 29th 2019, 13:45 ricksaccous $this->loadComponent('Security');
# Mar 29th 2019, 13:45 ricksaccous what about
# Mar 29th 2019, 13:44 liaogz82 no it is not there
# Mar 29th 2019, 13:44 ricksaccous in your code find $this->loadComponent('CSRF'); or whatever it's called
# Mar 29th 2019, 13:44 ricksaccous ;)
# Mar 29th 2019, 13:44 ricksaccous it is loaded somewhere
# Mar 29th 2019, 13:41 liaogz82 is there a way to turn it off?
# Mar 29th 2019, 13:41 liaogz82 no i did not load it in AppController
# Mar 29th 2019, 13:40 ricksaccous just don't load component if it's api request
# Mar 29th 2019, 13:40 ricksaccous CSRF is a component isn't it?
# Mar 29th 2019, 13:38 liaogz82 it seems to be default on
# Mar 29th 2019, 13:37 liaogz82 how do i do that?
# Mar 29th 2019, 13:35 admad JSON APIs can't have CSRF problem. Just turn of CSRF check for API urls
# Mar 29th 2019, 13:33 liaogz82 and I am using API calls with no authentication