CI newbie question regarding tutorial |
[eluser]Adam_R[/eluser]
I'm new to CodeIgniter so I have decided to follow user guide first and actually I'm stuck on http://ellislab.com/codeigniter/user-gui...ction.html :\ I'm able to display "news" but when I click to see particular news by slug I'm getting 404 error. Links to slug part looks like /index.php/news/news/test-X and routes are: Code: $route['news/create'] = 'news/create'; All code is copy-paste from the user guide tutorial. No clue why news is doubled. Thanks
[eluser]Matias Perrone[/eluser]
This forum is for bugs, check the "Code!" forum
[eluser]Aken[/eluser]
It has to do with the links that are created on the news homepage - there's an extra "news" segment in the URL. Search around, it has been brought up countless times.
[eluser]Adam_R[/eluser]
Thanks for a tip! I found and resolved issues. IMO tutorial code from the User Guide should be fixed to avoid any issues like mine.
[eluser]Adam_R[/eluser]
That part was wrong and actually somebody fixed it: Code: public function view($slug) there was Code: $data['news'] = $this->news_model->get_news($slug);
[eluser]Narf[/eluser]
This argument is pointless, but your claim is simply not true. ![]() The last time that page was modified is Oct 8th, 2012 (you can even verify that by looking at the HTTP response headers when you load the page). And even that is just a mark for CodeIgniter's latest release and not when this particular page was actually updated.
[eluser]Aken[/eluser]
The $data array key was wrong at one point, it has been resolved. The relative URL in the index view continues to confuse new users. |
Welcome Guest, Not a member yet? Register Sign In |