[TYPO3-mvc] Warning: Unknown class passed as parameter and cache problem

Xavier Perseguers typo3 at perseguers.ch
Sun Sep 13 09:12:06 CEST 2009


Hi,

I have this method signature:

/**
  * Returns a list of persons corresponding to search criteria.
  *
  * @param string $lastName
  * @param string $firstName
  * @return string The rendered view
  */
public function searchAction($lastName, $firstName) {

}

I have mainly two problems with it.

1) After clearing the cache, first time I search for a person, I get this warning multiple times:

Warning: Unknown class passed as parameter in extbase/Classes/Reflection/Service.php on line 394

Related code is method buildClassSchema() which tries to understand the type of argument I have but seems to have problems with simple strings. Do I have to do this differently? Because after the 
warnings, my result set is valid but garbage is issued with first query after clearing the cache.

2) A bit odd, I still don't understand what is happening but my search query is somehow cached because it always returns the resultset I got with the search criteria I had after clearing cache. 
Meaning I clear cache, can issue any search but then, any subsequent search returns same resultset. And of course I registered my plugin with code below in ext_localconf.php:

Tx_Extbase_Utility_Extension::configurePlugin(
	'MySearch',
	'Persons',
	array(
		'Person'   => 'index,search',
	),
	array(
		'Person'   => 'search',
	)
);

Any hint?

-- 
Xavier Perseguers
http://xavier.perseguers.ch/en

One contribution a day keeps the fork away


More information about the TYPO3-project-typo3v4mvc mailing list