2
votes

TYPO3 was from a very old version updated to TYPO3 6.2. The most things are working now, but I have one own written extension that give me the following error:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1297759968: Exception while property mapping at property path "":Could not find a suitable type converter for "String" because no such class or interface exists. | TYPO3\CMS\Extbase\Property\Exception thrown in file /srv/vhosts.d/typo3_src-6.2.9/typo3/sysext/extbase/Classes/Property/PropertyMapper.php in line 106.

I have a list Method in one of the controller that generates a link:

<f:link.action action="show" arguments="{id : course.id}"> {course.name}</f:link.action>

This list method works, but when I want to open this generated link in the website I get the error from above.

I delete all stuff in the showAction method and also change the template to a basic output without special things. The method looks than like this:

 /**
 * action show
 *
 * @param String Course-Id
 * @return void
 */
public function showAction($id){

}

But the error is still there. I have absolutely no idea anymore what is the problem. It would be great when someone have a different view and properly have some ideas where I can try to find out what the problem really is.

2
Not sure, but I believe you misstyped String in the documentation comment. Try string with a small s instead. Also clear the cache from the install tool after the change, to make sure the doc comments will be parsed again.Jost
Thanks for your hint. It was not the solution but it helped me to find the answer for my problem. I will write it down here next if someone have similar problems.Mirar

2 Answers

3
votes

I think it needs to be

 /**
  * action show
  *
  * @param string $id Course-Id
  * @return void
  */
 public function showAction($id){

 }

string lowercase and the argument $id must be specified as well

1
votes

I want to share my solution way:

The first problem was that I don't know that there is a new way to delete the cache of the core. That I find out because of Jost comment in my answer with the "clear the cache from install tool". So I go in the Backend of Typo3 to edit a user and edit there my own under Options the TSconfig field. I add there a row with options.clearCache.system = 1. Now I can clear the system core over the flash symbol in the Backend of Typo3.

After that I try to change the @param String in @param string. I deleted the core cache and then I got a different error. I found out that this new error say that only arrays or objects are as parameters are allowed in the action method (See: http://wiki.typo3.org/Exception/CMS/1253175643). So I deleted the parameter and follow the instruction on the website where the error is explained. So my new method looks as follow:

/**
* action show
*
* @return void
*/
public function showAction(){
    if ($this->request->hasArgument('id')) {
        $id= $this->request->getArgument('id');
    }
    // Do stuff with the id
}

And that works now :)