Welcome Guest, Not a member yet? Register   Sign In
Default Controller Assign Issue
#1

[eluser]CoolGoose[/eluser]
I can't seem to be able to assign the default controller to be one from a sub folder.

So i have
Code:
controllers/videos/frontpage.php
And in routes config i added.

$route['default_controller'] = "videos/frontpage";

It fails at

Code:
if ( ! class_exists($class)
    OR $method == 'controller'
    OR strncmp($method, '_', 1) == 0
    OR in_array($method, get_class_methods('Controller'), TRUE)
    )
{
    show_404("{$class}/{$method}");
}
because $class is videos/frontpage and not only frontpage as it would be if you would access site.com/videos/frontpage

Any ideas ?
#2

[eluser]CoolGoose[/eluser]
It seems that the pagination class also has problems when you're trying to do a pagination in a controller inside another folder. It doesn't quite guess the correct uri part.

Can somebody please move this in the bug reporting forum ?
#3

[eluser]Thorpe Obazee[/eluser]
I believe the correct uri segment can be set in the pagination config, 'uri_segment'
#4

[eluser]Colin Williams[/eluser]
Chamyto is dead-on about the pagination issue. And, I cannot replicate the default controller problem you are having. Chances are you goofed spelling somewhere, or you are using mod_rewrite in a way that disturbs CI's URI handling.
#5

[eluser]CoolGoose[/eluser]
[quote author="Chamyto" date="1218847782"]I believe the correct uri segment can be set in the pagination config, 'uri_segment'[/quote]

Yes I know, and it works. I was telling about the automated uri discovery that doesn't work.

[quote author="Colin Williams" date="1218859575"]Chamyto is dead-on about the pagination issue. And, I cannot replicate the default controller problem you are having. Chances are you goofed spelling somewhere, or you are using mod_rewrite in a way that disturbs CI's URI handling.[/quote]

No I didn't misspell it also I tried loading several other controllers.
Here's the htaccess.

Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ /index.php/$1 [L,QSA]
#6

[eluser]Colin Williams[/eluser]
Have you overridden any CI_Router class methods?
#7

[eluser]CoolGoose[/eluser]
None. I'll do a bit more debugging when I'll have the time. Right now it only seems that the
Code:
$class
variable gets the wrong controller name. It doesn't actually split it as it should.
#8

[eluser]everdaniel[/eluser]
Hi everyone!

Is there a workaround for this issue? I'm having the exact same problem.




Theme © iAndrew 2016 - Forum software by © MyBB