This works for me. Router::scope('/bookmarks', function ($routes) { $routes->connect('/tagged/*', ['controller' => 'Bookmarks', 'action' => 'tags']); });
Thanks for the video. I did as you have suggested, but my tagged page does not have any left margin, there is no indentation, it starts from the left most pixel in the page. Can you help please.
Your tutorial helped me much understanding how CakePHP works. This is a realy great tutorial! Is there a "Cake way" to do an AND statement? I want to use bookmarks/tagged/cooking/tutorial to get all bookmarks tagged with cooking AND tutorial.
In the custom bookmarks page find tag, how to handle empty tag (blank)? Otherwise, it will return "Impossible to generate condition with empty list of values for field (Tags.title)" Thank you.
y in my tags function I have to use $this->loadModel("Bookmarks") before $bookmarks = $this->Bookmarks->find... otherwise it will report Error: Call to a member function find() on a non-object . is this because our cakephp version different?
Hey, I'm facing a problem here: Whenever I try to run the code I get : Invalid argument supplied for foreach(). As it seems the query is not fetching anything (even after I did recheck it multiple times ) Any hints on this?
That isn't a text field, it's a selection box. If you create some new tags first, you'll see the tags appear in that box to be selected when you create a bookmark. Figured I should mention even if you figured it out, in case anyone else runs into the problem and sees your comment.
For some reason CakePHP 3 is running really slow on my webserver. I'm using hostgator and when I run a query on CakePHP 3 it is extremely slow in gettings results. What can be the problem?
+Puse Contact CakePHP has been known to be rather slow, but Version 3 is much faster. Maybe your server host isn't as fast as it should be? I haven't worked with hostgator before so don't know how fast they are.
I get an Error: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #9 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'cakephp.BookmarksTags.tag_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Hey, I got the same problem and this helped me(Im using ubuntu 18.04): 1.open your terminal 2.type: sudo mysql -u root -p 3.enter password for your mysql 4.and type: SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY','')); Hope it will work link : stackoverflow.com/questions/36950857/sqlstate42000-syntax-error-or-access-violation-1055-expression-3-of-select
JB you may want to redirect peoples eyes to that part in app.php where it says MySQL on MAMP uses port 8889, MAMP users will want to uncomment the following line and set the port accordingly 'port'=>'8889'. Otherwise people will be frustrated for hours wondering why they cannot connect to the database.
+Ngaboyera Valens I know and i'm working on it :) I will upload it over the weekend, so check back saturday or sunday for it. I think the series will run like 5-6 episodes before the tutorial is done.
I followed this on routing but I failed to understand the end result. I was expecting to see how to built a search form using input text and dropdown options
+Ngaboyera Valens That would be easy to accomplish once you understand this video. You just build the form using plain old HTML, and then construct the search form to go the URL you defined in the routings. You could also make like a "search" method you go to first in the controller, which then reads the request params and construct an URL. For example: 1. Create a form / dropdown / whatever HTML search form you want 2. Have it call a method called "findWithFormData" or whatever on the Controller. 3. Implement the method in the controller - extract the request data, construct the URL to be something like param1/param2 just like we did in the video 4. Have it redirect to that (just google cakephp 3 redirect) Hope it helps.
I am getting an error: Missing Helper cake\view\Exception\MissingExceptionHelper think its somthing on this line I think in tags.ctp when looking at errors on page $this->$Html->link($bookmark->title, $bookmark->url);
Thanks -- I'm finding these videos to be a great explanatory accompaniment to the standard text tutorial.
Thanks for those great videos. You make cakephp so simple!
This works for me.
Router::scope('/bookmarks', function ($routes) {
$routes->connect('/tagged/*', ['controller' => 'Bookmarks', 'action' => 'tags']);
});
Dude these videos are amazing :) Good Job
please make the intro music a little less loud..
I like the color scheme on your PHP storm. Can you tell me the name of it or how to use it ?
Hi! What is the difference between using "Scope" method and using directly Router::connect("...") method ?
Thanks for the video. I did as you have suggested, but my tagged page does not have any left margin, there is no indentation, it starts from the left most pixel in the page. Can you help please.
I am wondering why you chose to name the method 'tags' rather then 'tagged'. Would it not make more sense?
Thanks for those great videos
thank you so much!!!
i'm watting more your video
:)
+Phạm Thắng Part 4 is live! checkout my channel :)
Your tutorial helped me much understanding how CakePHP works. This is a realy great tutorial!
Is there a "Cake way" to do an AND statement?
I want to use bookmarks/tagged/cooking/tutorial to get all bookmarks tagged with cooking AND tutorial.
where are you getting these links? did you prepopulate these things before? I don't get any sidelinks showing up.
Thank you for this awesome video, Keep it up
In the custom bookmarks page find tag, how to handle empty tag (blank)? Otherwise, it will return
"Impossible to generate condition with empty list of values for field (Tags.title)"
Thank you.
y in my tags function I have to use $this->loadModel("Bookmarks") before $bookmarks = $this->Bookmarks->find...
otherwise it will report Error: Call to a member function find() on a non-object . is this because our cakephp version different?
Nice tutorial man :)
Hey, I'm facing a problem here:
Whenever I try to run the code I get : Invalid argument supplied for foreach().
As it seems the query is not fetching anything (even after I did recheck it multiple times )
Any hints on this?
The association is not defined on Bookmarks. there is the error i am getting
hi which syntax hightlighting theme use u ?
very good tutorials by the way:)
+Krzysztof Draszek Thanks mate :) I believe i used this theme in the video: www.phpstorm-themes.com/theme/yka
Error: Create Controller::tags() in file: src\Controller\Controller.php.
i dont know why !??
When I create a bookmark I can't add any tags. The 'tags' text field will not allow text any suggestions?
That isn't a text field, it's a selection box. If you create some new tags first, you'll see the tags appear in that box to be selected when you create a bookmark. Figured I should mention even if you figured it out, in case anyone else runs into the problem and sees your comment.
For some reason CakePHP 3 is running really slow on my webserver. I'm using hostgator and when I run a query on CakePHP 3 it is extremely slow in gettings results. What can be the problem?
+Puse Contact CakePHP has been known to be rather slow, but Version 3 is much faster. Maybe your server host isn't as fast as it should be? I haven't worked with hostgator before so don't know how fast they are.
I get an Error: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #9 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'cakephp.BookmarksTags.tag_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Hey,
I got the same problem and this helped me(Im using ubuntu 18.04):
1.open your terminal
2.type: sudo mysql -u root -p
3.enter password for your mysql
4.and type: SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
Hope it will work
link : stackoverflow.com/questions/36950857/sqlstate42000-syntax-error-or-access-violation-1055-expression-3-of-select
JB you may want to redirect peoples eyes to that part in app.php where it says MySQL on MAMP uses port 8889, MAMP users will want to uncomment the following line and set the port accordingly 'port'=>'8889'. Otherwise people will be frustrated for hours wondering why they cannot connect to the database.
Congs. But we also need part 4
+Ngaboyera Valens I know and i'm working on it :) I will upload it over the weekend, so check back saturday or sunday for it. I think the series will run like 5-6 episodes before the tutorial is done.
Good I finish making the installation of my application and cake baking tables and it is fine.
I followed this on routing but I failed to understand the end result. I was expecting to see how to built a search form using input text and dropdown options
+Ngaboyera Valens That would be easy to accomplish once you understand this video. You just build the form using plain old HTML, and then construct the search form to go the URL you defined in the routings. You could also make like a "search" method you go to first in the controller, which then reads the request params and construct an URL.
For example:
1. Create a form / dropdown / whatever HTML search form you want
2. Have it call a method called "findWithFormData" or whatever on the Controller.
3. Implement the method in the controller - extract the request data, construct the URL to be something like param1/param2 just like we did in the video
4. Have it redirect to that (just google cakephp 3 redirect)
Hope it helps.
I am getting an error: Missing Helper
cake\view\Exception\MissingExceptionHelper
think its somthing on this line I think in tags.ctp when looking at errors on page
$this->$Html->link($bookmark->title, $bookmark->url);
+cormac71 remove '$' from Html
$this->Html->link($bookmark->title, $bookmark->url);
url
Please make a new intro
I like the color scheme on your PHP storm. Can you tell me the name of it or how to use it ?