Unable to resolve the request "gii".

Hi Leute,

habe heute 1.13 installiert und wollte nun GII verwenden.

Laut http://www.yiiframework.com/doc/guide/quickstart.first-app muss ich in der config Datei nur gii hinzufügen und anschließend folgende URL aufrufen

http://www.xxx.de/index.php?r=gii

Leider erhalte ich ständig die Meldung

Unable to resolve the request "gii".

Hier ein Auszug auf meiner main.php




return array(

	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',

	'name'=>'My Web Application',


	// preloading 'log' component

	'preload'=>array('log'),


	// autoloading model and component classes

	'import'=>array(

		'application.models.*',

		'application.components.*',

	),


	'modules'=>array(

		'gii'=>array(

			'class'=>'system.gii.GiiModule',

			'password'=>'giipass',

		),

	),

Wer kann mir bitte weiterhelfen?

thx!

Ich hatte es damals mit den rules getestet und es hat funktioniert.




'components'=>array(

    ......

    'urlManager'=>array(

        'urlFormat'=>'path',

        'rules'=>array(

            'gii'=>'gii',

            'gii/<controller:\w+>'=>'gii/<controller>',

            'gii/<controller:\w+>/<action:\w+>'=>'gii/<controller>/<action>',

            ...existing rules...

        ),

    ),

)



mmh, wenn ich deine Regeln einfüge klappt es auch nicht.


'urlManager'=>array(

	'urlFormat'		=>	'path',

//	'showScriptName'	=>	false,

	'urlSuffix' 		=> '.html',

	'rules' => array

	(

		'<controller:\w+>/<id:\d+>'		=>	'<controller>/view',

		'<controller:\w+>/<action:\w+>/<id:\d+>'=>	'<controller>/<action>',

		'<controller:\w+>/<action:\w+>'		=>	'<controller>/<action>',


	        'gii'					=>	'gii',

	        'gii/<controller:\w+>'			=>	'gii/<controller>',

	        'gii/<controller:\w+>/<action:\w+>'	=>	'gii/<controller>/<action>',


	),

),

Wenn ich folgenden Wert auskommentiere kann ich keine Controller aufrufen!

// ‘showScriptName’ => false,

Ich habe die hier her. Am Besten mal deine urlmanager config komplett rausnehmen und dann testen.

ich habe nachwievor Probleme GII bei einem neuen Projekt zum laufen zu bekommen.

Ständig erhalte ich die Fehlermeldung: Unable to resolve the request "gii"..

Hier ist meine main.php


return array(

'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',

'name'=>'My Web Application',


// preloading 'log' component

'preload'=>array('log'),


// autoloading model and component classes

'import'=>array(

	'application.models.*',

	'application.components.*',

),


// application components

'components'=>array(

	'user'=>array(

		// enable cookie-based authentication

		'allowAutoLogin'=>true,

	),

	// uncomment the following to enable URLs in path-format

	'urlManager'=>array(

		'urlFormat'=>'path',

		'urlSuffix'=> '.html',

		'rules' => array

		(

			'<controller:\w+>/<id:\d+>'	=>	'<controller>/view',

			'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',

			'<controller:\w+>/<action:\w+>'	=>	'<controller>/<action>',


			'gii'					=>	'gii',

			'gii/<controller:\w+>'			=>	'gii/<controller>',

			'gii/<controller:\w+>/<action:\w+>'	=>	'gii/<controller>/<action>',


		),

	),

//		'db'=>array(

//			'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',

//		),

		// uncomment the following to use a MySQL database


		'db'=>array(

			'connectionString'	=> 'mysql:host=localhost;dbname=track',

			'emulatePrepare'	=> true,

			'username'			=> 'root',

			'password'			=> '',

			'charset'			=> 'utf8',

		),


		'errorHandler'=>array(

			// use 'site/error' action to display errors

            'errorAction'=>'site/error',

        ),

		'log'=>array(

			'class'=>'CLogRouter',

			'routes'=>array(

				array(

					'class'=>'CFileLogRoute',

					'levels'=>'error, warning',

				),

				// uncomment the following to show log messages on web pages

				/*

				array(

					'class'=>'CWebLogRoute',

				),

				*/

			),

		),

		'modules' => array(

			'gii' => array(

				'class'		=> 'system.gii.GiiModule',

				'password'	=> 'pass',

			),

		),

	),


	// application-level parameters that can be accessed

	// using Yii::app()->params['paramName']

	'params'=>array(

		// this is used in contact page

		'adminEmail'=>'webmaster@example.com',

	),

);

Folgende URL rufe ich auf

http://localhost/track/index.php/gii

wer weiß bitte Rat? thx!

das modules-Array gehört ausserhalb von components (was für ein deutsch :lol: )

:D

omg, das habe ich garnicht gesehen!

Vielen Dank für deine Antwort.

mmh oder auf denglisch

Vielen Thanks für your Antwort ^^

aber der erste auszug aus deiner config war eigentlich richtig

ich kann mir das grad auch nicht erklären.

ich habe mal die rules rausgenommen und es funktioniert trotzdem.

Der erste Post liegt nun länger als einen Monat zurück, sodass ich vermute das Gii erweitert und verbessert worden ist.