Tag extension

Function/Class '...' was not prepended with 'user_'

I'm currently configuring one of my extension for realurl within Typo3. My aim is to have the categories and subcategories of an article center within the url. But the functionality of lookUpTable does not suffice as I have to observe the nesting of the categories. So I choose userFunc and enter the values as given in the realurl documentation:

'fixedPostVars' => array(
    'articlecenter' => array(
        'userFunc' => 'EXT:extkey/class.tx_userxyz.php:
            &tx_realurl_userfunctest->main',
    ),
),

then I clear the cache and it happens... nothing. Only a nice error message is presented:

|Function/Class 'E' was not prepended with 'user_'|

Seems that my configured values do not really reach the code they should. And of course that's the way it is. After some searching I detect that my configuration is wrong, because realurl is putting all configured values into a nested array wherein every key-value pair is put in as an array that has a numeric indice in the big array. (I hope you can follow my poor english). But my "userFunc" is not set up this way, its numeric indice is userFunc and the array with the key-value pairs is the string EXT:realurl/class.tx_realurl_userfunctest.php:&tx_realurl_userfunctest->main. As realurl runs through this array using foreach it has only "E" as value (that comes from the "EXT") and furthermore the error is thrown in t3lib_div:callUserFunction. Now the solution is quite easy, simply nest the userFunc within an additional array:

'fixedPostVars' => array(
    'articlecenter' => array(
        array(
            'userFunc' => 'EXT:extkey/class.tx_userxyz.php:
                &tx_realurl_userfunctest->main',
        ),
    ),
),

Now everything is working again. You only need to find it out...