[TYPO3-mvc] Controller name is composed with lower case

Reginaldo Arredondo reggiearre at googlemail.com
Mon Jan 24 03:44:44 CET 2011


Hello everyone,

I didn´t find anything on this problem on the Internet so far, so I need
your help on this one.

I uploaded a site I created on my XAMPP local server on typo3 4.4.4.
On my host I have typo3 4.4.6.
Extbase Versions are the same.

The problem is the following: I created a frontend plugin extension for
freight tracking. The extension allows logged in fe-users to create a
booking entry with all details and to create events and comments to that
booking. On my local XAMPP installation, everything works just fine.
But on my webhost, when trying to create new events or comments to a
booking, the following error is shown:

Fatal error: Class 'Tx_RaFreighttracking_Controller_bookingController' not
found in .../typo3_src-4.4.6/t3lib/class.t3lib_div.php on line 5272

It is no problem to create a new booking entry. But ones that booking is
created and I try to add events or comments, the error occurs. I did not
change any of the code so I think it is related to the difference in typo3
versions.
I wonder why in 'Tx_RaFreighttracking_Controller_bookingController' the
controller name "bookingController" is written in lower case. Shouldn´t  it
be "BookingController"?

in class.t3lib_div.php:

5242    /**
5243     * Creates an instance of a class taking into account the
class-extensions
5244     * API of TYPO3. USE THIS method instead of the PHP "new" keyword.
5245    * Eg. "$obj = new myclass;" should be "$obj =
t3lib_div::makeInstance("myclass")" instead!
5246     * You can also pass arguments for a constructor:
5247     *     t3lib_div::makeInstance('myClass', $arg1, $arg2,  ..., $argN)
5248     *
5249     * @param    string        Class name to instantiate
5250     * @return    object        A reference to the object
5251     */
5252    public static function makeInstance($className) {
5253            // holds references of singletons
5254        static $instances = array();
5255
5256            // Get final classname
5257        $className = self::getClassName($className);
5258
5259        if (isset($instances[$className])) {
5260                // it's a singleton, get the existing instance
5261           $instance = $instances[$className];
5262        } else {
5263            if (func_num_args() > 1) {
5264                   // getting the constructor arguments by removing this
5265                  // method's first argument (the class name)
5266                $constructorArguments = func_get_args();
5267                array_shift($constructorArguments);
5268
5269                $reflectedClass = new ReflectionClass($className);
5270                $instance =
$reflectedClass->newInstanceArgs($constructorArguments);
5271            } else {
5272                $instance = new $className;
5273            }
5274
5275            if ($instance instanceof t3lib_Singleton) {
5276                    // it's a singleton, save the instance for later
reuse
5277                $instances[$className] = $instance;
5278            }
5279        }
5280
5281        return $instance;
5282    }


Does somebody know this error? How can I solve it?

Since I don´t know where to search for a solution, please let me know if you
need more information or code.

Thanks for your help and greetings from Shanghai,
Reggie


More information about the TYPO3-project-typo3v4mvc mailing list