caseSensitive bug in Url Manager

I’ve created couple of controllers named

adminController, clientController, backendCMSController … etc.

after moving to live server, I’ve hidden the index.php and did the following in url manager.




 'urlFormat'=>'path',

 'showScriptName'=>false,

 'caseSensitive'=>false,

When I tried to access those pages, adminController and clientController seems OK but backendCMSController didn’t load and showed a 404 error. I’ve tried upper case / lower case in url address bar but still showed 404 error. I looked at the log and that seems it was trying to load an action from default site controller.

However, when I removed the caseSensitive=>false then everything seems ok.

It’s definitely a bug, isn’t it?

hey!

don’t think so its a bug, but it is the way Yii handles that…when you set caseSensitive=>false, you have to rename your controller to

BackendcmsController (only first letter of controller name and "C" uppercased)

Qiang’s words (http://www.yiiframework.com/forum/index.php?/topic/651-controller-file-name-case-sensitive/page__view__findpost__p__15145)

:)

regards!

Another solution was given by mdomba here: http://code.google.com/p/yii/issues/detail?id=3100#c5

I recently struggled with this and it appeared that the urlManager flag of caseSensitive=>false did not remedy the problem.

In the end, I had to rename the folders in views corresponding to the controller id to be camel case.

E.g. GenerateConfigurationController has an action called index. This should be represented in the file system as

views/generateConfiguration/index.php

where previously I had

views/generateconfiguration/index.php

I believe a user tried to raise a bug, but it was rejected as "invalid" see code.google.com/p/yii/issues/detail?id=2846

I hope this helps somebody at some stage!

All the best,

John Paul.

Case sensitive false does not apply to everything, except the routes.

So it really was invalid. :)

But thanks for the tip, John.